:root {
  --primary: #0A5C36;
  --primary-dark: #06351F;
  --secondary: #F7931E;
  --accent: #E63946;
  --text: #222222;
  --muted: #667085;
  --line: #E5E7EB;
  --bg: #FFFFFF;
  --soft: #F5F8F6;
  --shadow: 0 14px 36px rgba(16, 24, 40, .08);
}

* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Noto Sans Devanagari", system-ui, sans-serif;
  line-height: 1.6;
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; object-fit: cover; }
.container { width: min(1180px, calc(100% - 32px)); margin: 0 auto; }
.site-header { position: sticky; top: 0; z-index: 30; background: rgba(255,255,255,.96); border-bottom: 1px solid var(--line); backdrop-filter: blur(14px); }
.top-strip { background: var(--primary); color: #fff; text-align: center; padding: 7px 12px; font-weight: 800; font-size: 14px; }
.navbar { display: flex; align-items: center; gap: 18px; min-height: 72px; }
.brand, .footer-brand { font-size: 30px; font-weight: 900; color: var(--primary); letter-spacing: 0; }
.brand span, .footer-brand span { color: var(--secondary); }
.nav-links { display: flex; align-items: center; gap: 14px; flex: 1; font-weight: 800; font-size: 15px; }
.nav-links a:hover { color: var(--primary); }
.nav-toggle { display: none; border: 0; background: var(--soft); padding: 8px 10px; border-radius: 6px; }
.search-box { position: relative; width: 250px; }
.search-box input, .wide-search input { width: 100%; border: 1px solid var(--line); border-radius: 999px; padding: 11px 15px; font: inherit; outline-color: var(--primary); }
.suggestions { position: absolute; top: 48px; left: 0; right: 0; background: #fff; border: 1px solid var(--line); border-radius: 8px; box-shadow: var(--shadow); overflow: hidden; display: none; }
.suggestions a { display: block; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.auth-links { position: relative; display: flex; align-items: center; gap: 8px; }
.login-link, .register-link, .user-menu-trigger { border: 1px solid var(--line); border-radius: 999px; padding: 9px 13px; font-weight: 900; background: #fff; cursor: pointer; }
.register-link { background: var(--primary); color: #fff; border-color: var(--primary); }
.user-menu-trigger { display: flex; align-items: center; gap: 8px; }
.user-menu-trigger img { width: 30px; height: 30px; border-radius: 50%; }
.user-menu { display: none; position: absolute; right: 0; top: 46px; min-width: 190px; background: #fff; border: 1px solid var(--line); border-radius: 8px; box-shadow: var(--shadow); padding: 8px; z-index: 40; }
.auth-links:hover .user-menu { display: block; }
.user-menu a, .user-menu button { display: block; width: 100%; text-align: left; border: 0; background: transparent; padding: 9px 10px; border-radius: 6px; font: inherit; font-weight: 800; cursor: pointer; }
.user-menu a:hover, .user-menu button:hover { background: var(--soft); }
.mobile-header-actions, .mobile-search-panel, .mobile-user-panel { display: none; }
.notice { margin-top: 14px; padding: 12px 14px; border-radius: 8px; font-weight: 800; }
.notice.success { background: #E9F8EF; color: var(--primary); }
.notice.error { background: #FDECEC; color: #A11220; }

.ticker { background: #FFF7ED; border-bottom: 1px solid #FED7AA; }

.ticker-inner { display: flex; align-items: center; gap: 20px; position: relative; overflow: hidden; padding: 10px 0; background: #FFF7ED; }
.ticker strong { background: #ef4444; color: #ffffff; padding: 12px 22px; border-radius: 10px; position: relative; z-index: 50; overflow: hidden; white-space: nowrap; display: flex; align-items: center; justify-content: center; flex-shrink: 0; box-shadow: 0 4px 10px rgba(0,0,0,.15); font-weight: 900; text-align: center; pointer-events: none; }
.ticker-window { overflow: hidden; position: relative; z-index: 1; flex: 1; min-width: 0; height: 42px; }
.ticker-track { position: absolute; top: 50%; left: 0; display: flex; gap: 36px; white-space: nowrap; align-items: center; transform: translateY(-50%); will-change: transform; animation: ticker 28s linear infinite; }
.ticker-track a::before { content: "•"; color: var(--accent); margin-right: 10px; }

@keyframes ticker { 0% { transform: translate(0, -50%); } 100% { transform: translate(-50%, -50%); } }

.lead-layout { display: grid; grid-template-columns: minmax(0, 2fr) 370px; gap: 24px; padding: 28px 0; }
.hero-story { position: relative; min-height: 500px; overflow: hidden; border-radius: 8px; background: #111; box-shadow: var(--shadow); }
.hero-story img { width: 100%; height: 100%; position: absolute; inset: 0; opacity: .72; transition: transform .35s ease; }
.hero-story:hover img { transform: scale(1.03); }
.hero-story::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,.05), rgba(0,0,0,.78)); }
.hero-content { position: absolute; z-index: 1; left: 30px; right: 30px; bottom: 28px; color: #fff; }
.hero-content h1 { margin: 10px 0; font-size: clamp(34px, 5vw, 58px); line-height: 1.08; }
.hero-content p { max-width: 780px; font-size: 18px; }
.chip { display: inline-flex; background: var(--secondary); color: #fff; padding: 5px 11px; border-radius: 999px; font-weight: 900; font-size: 13px; }
.panel { border: 1px solid var(--line); border-radius: 8px; padding: 18px; background: #fff; box-shadow: 0 8px 28px rgba(16, 24, 40, .05); }
.panel h2, .section-title h2 { margin: 0; font-size: 24px; line-height: 1.2; }
.lead-stack { display: grid; gap: 18px; }
.highlight-panel { border-top: 4px solid var(--primary); }
.ranked-link { display: grid; grid-template-columns: 32px 1fr; gap: 10px; padding: 13px 0; border-bottom: 1px solid var(--line); font-weight: 800; }
.ranked-link span { width: 28px; height: 28px; border-radius: 50%; background: var(--primary); color: #fff; display: grid; place-items: center; font-size: 13px; }
.headline-link { display: block; padding: 12px 0; border-bottom: 1px solid var(--line); font-weight: 800; }
.ranked-link:last-child, .headline-link:last-child { border-bottom: 0; }

.news-layout { display: grid; grid-template-columns: minmax(0, 1.65fr) 360px; gap: 24px; margin-bottom: 30px; }
.section-title { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 16px; }
.section-title a { color: var(--primary); font-weight: 900; }
.news-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.article-card { display: grid; gap: 12px; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: #fff; box-shadow: 0 8px 26px rgba(16,24,40,.05); transition: transform .2s ease, box-shadow .2s ease; }
.article-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.article-card .thumb img { width: 100%; aspect-ratio: 16/10; background: var(--soft); }
.article-card > div { padding: 0 15px 15px; }
.article-card h3 { margin: 9px 0 6px; font-size: 21px; line-height: 1.28; }
.article-card p, .meta, .match-card small, .profile-card span, .muted { color: var(--muted); }
.sidebar { display: grid; gap: 18px; align-content: start; }
.match-panel { background: linear-gradient(180deg, #fff, #F8FBF9); }
.match-card { display: block; border: 1px solid var(--line); border-radius: 8px; padding: 13px; margin-top: 12px; background: #fff; }
.match-card span { color: var(--accent); font-weight: 900; font-size: 13px; }
.match-card b { display: block; margin: 5px 0; }
.match-card.result span { color: var(--primary); }

.topic-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; margin-bottom: 30px; }
.topic-panel { padding: 0; overflow: hidden; }
.topic-panel h2 { padding: 16px 16px 0; }
.topic-link { display: grid; grid-template-columns: 86px 1fr; gap: 12px; padding: 14px 16px; border-bottom: 1px solid var(--line); font-weight: 800; }
.topic-link img { width: 86px; height: 58px; border-radius: 6px; }
.topic-link:last-child { border-bottom: 0; }
.dashboard-grid { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(340px, .9fr); gap: 24px; margin-bottom: 30px; }
.profile-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 16px; }
.profile-card { border: 1px solid var(--line); border-radius: 8px; padding: 14px; display: grid; gap: 8px; background: #fff; transition: transform .2s ease, box-shadow .2s ease; }
.profile-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.profile-card img { width: 100%; aspect-ratio: 1; border-radius: 8px; background: var(--soft); }
.points-table { width: 100%; border-collapse: collapse; }
.points-table th, .points-table td { padding: 11px 8px; border-bottom: 1px solid var(--line); text-align: left; }
.points-table th { background: var(--soft); font-weight: 900; }
.more-news { margin-bottom: 30px; }
.compact-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.compact-card { border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: #fff; font-weight: 800; box-shadow: 0 8px 24px rgba(16,24,40,.05); }
.compact-card img { width: 100%; aspect-ratio: 16/10; }
.compact-card span { display: block; padding: 12px; }

.newsletter { background: var(--primary); color: #fff; margin-top: 34px; }
.newsletter-inner { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 34px 0; }
.newsletter h2 { margin: 0 0 6px; font-size: 30px; }
.newsletter p { margin: 0; color: rgba(255,255,255,.82); }
.newsletter form, .wide-search { display: flex; gap: 10px; }
.newsletter input { border: 0; border-radius: 999px; padding: 12px 16px; min-width: 280px; font: inherit; }
.newsletter button, .wide-search button, .btn { border: 0; background: var(--secondary); color: #fff; border-radius: 999px; padding: 11px 18px; font-weight: 900; cursor: pointer; }
.ghost-btn { background: #fff; color: var(--primary); border: 1px solid var(--line); }
.danger-btn { background: var(--accent); }
.btn-google { background: #fff; color: var(--text); border: 1px solid var(--line); display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.btn-google:hover { background: var(--soft); }
.divider { display: flex; align-items: center; gap: 12px; margin: 18px 0; font-size: 14px; color: var(--muted); }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }

.footer { background: #0B0F0D; color: #fff; padding-top: 42px; }
.footer-grid { display: grid; grid-template-columns: 1.7fr 1fr 1fr 1fr; gap: 28px; }
.footer-brand { display: inline-block; color: #fff; margin-bottom: 12px; }
.footer p { color: #D0D5DD; margin: 0; }
.footer h4 { margin: 0 0 12px; color: #fff; }
.footer a { display: block; color: #D0D5DD; margin: 7px 0; }
.footer a:hover { color: var(--secondary); }
.footer-bottom { margin-top: 34px; border-top: 1px solid rgba(255,255,255,.12); padding: 14px 0; color: #D0D5DD; font-size: 14px; }
.footer-bottom .container { display: flex; justify-content: space-between; gap: 14px; }

.page-head { padding: 32px 0 18px; }
.page-head h1 { font-size: 42px; margin: 0 0 8px; }
.article-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 28px; padding: 30px 0; }
.article-main h1 { font-size: clamp(32px, 5vw, 56px); line-height: 1.12; margin: 10px 0; }
.lead { font-size: 20px; color: var(--muted); }
.article-image { width: 100%; max-height: 520px; border-radius: 8px; margin: 22px 0; }
.article-content { font-size: 19px; }
.article-content p { margin: 0 0 18px; }
.share-box, .info-box, .ad-slot, .score-box { border: 1px solid var(--line); border-radius: 8px; padding: 14px; margin: 18px 0; background: var(--soft); }
.share-box a { margin-left: 10px; color: var(--primary); font-weight: 800; }
.cricapi-spinner { display: inline-block; width: 16px; height: 16px; border: 2px solid var(--line); border-top-color: var(--primary); border-radius: 50%; animation: cricapi-spin .8s linear infinite; vertical-align: middle; }
.cricapi-spinner[hidden] { display: none; }
@keyframes cricapi-spin { to { transform: rotate(360deg); } }
.article-actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 16px 0; }
.comments-box textarea, .auth-card input, .auth-card textarea, .account-form input, .account-form textarea, .account-form select, .delete-panel input { width: 100%; border: 1px solid var(--line); border-radius: 8px; padding: 11px 12px; font: inherit; }
.comment-item { border-top: 1px solid var(--line); padding: 12px 0; }
.comment-item p { margin: 4px 0 0; }
.auth-section { min-height: 620px; display: grid; place-items: center; padding: 44px 0; }
.public-auth-card { width: min(460px, 100%); border: 1px solid var(--line); border-radius: 8px; box-shadow: var(--shadow); padding: 26px; background: #fff; }
.public-auth-card h1 { margin: 10px 0 4px; font-size: 36px; }
.account-helper-card { display: flex; gap: 12px; margin-top: 20px; padding: 16px; background: #fff; border: 1px solid var(--primary); border-radius: 8px; }
.account-helper-icon { flex: 0 0 36px; width: 36px; height: 36px; display: grid; place-items: center; color: var(--primary); background: #E9F8EF; border-radius: 50%; }
.account-helper-card h2 { margin: 0 0 5px; font-size: 18px; }
.account-helper-card p { margin: 0 0 12px; }
.account-helper-action { display: inline-flex; align-items: center; text-decoration: none; }
.stack { display: grid; gap: 14px; }
.stack label { display: grid; gap: 6px; font-weight: 800; }
.form-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.check-label { display: flex !important; grid-template-columns: auto 1fr; align-items: center; gap: 8px; }
.check-label input { width: auto; }
.check-label a { color: var(--primary); cursor: pointer; transition: color .2s ease, text-decoration-color .2s ease; }
.check-label a:hover { text-decoration: underline; }
.google-placeholder { width: 100%; border: 1px dashed var(--line); border-radius: 999px; background: var(--soft); padding: 11px; margin-top: 14px; font-weight: 900; color: var(--muted); }
.auth-switch a { color: var(--primary); font-weight: 900; }
.account-header { display: flex; align-items: center; gap: 18px; padding: 30px 0 10px; }
.account-header img { width: 92px; height: 92px; border-radius: 50%; border: 4px solid var(--soft); }
.account-header h1 { margin: 0; font-size: 36px; }
.account-layout { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 22px; padding-bottom: 34px; }
.with-top-space { padding-top: 30px; }
.account-sidebar { display: grid; gap: 6px; align-content: start; }
.account-sidebar a, .account-sidebar button { border: 0; background: transparent; text-align: left; padding: 10px 12px; border-radius: 6px; font: inherit; font-weight: 900; cursor: pointer; }
.account-sidebar a:hover, .account-sidebar button:hover { background: var(--soft); }
.account-sidebar .danger { color: var(--accent); }
.account-content { min-width: 0; }
.visually-hidden { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; margin: -1px !important; overflow: hidden !important; clip: rect(0, 0, 0, 0) !important; white-space: nowrap !important; border: 0 !important; }
.profile-avatar-section { display: flex; flex-direction: column; align-items: center; padding: 4px 0 10px; }
.profile-avatar-control { position: relative; box-sizing: content-box; width: 140px; height: 140px; flex: 0 0 140px; border: 3px solid #fff; border-radius: 50%; box-shadow: 0 8px 24px rgba(16, 24, 40, .16), 0 0 0 2px var(--primary); overflow: hidden; cursor: pointer; transition: box-shadow 300ms ease, transform 300ms ease; }
.profile-avatar-control img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }
.profile-avatar-control:hover, .profile-avatar-control:focus-visible { transform: translateY(-2px); box-shadow: 0 12px 30px rgba(16, 24, 40, .2), 0 0 0 3px var(--secondary); outline: 0; }
.profile-avatar-control.is-dragging { box-shadow: 0 12px 30px rgba(16, 24, 40, .2), 0 0 0 4px var(--primary); }
.profile-avatar-control.is-dragging::after { content: ""; position: absolute; inset: 5px; border: 2px dashed #fff; border-radius: 50%; pointer-events: none; }
.profile-avatar-overlay { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; gap: 7px; background: rgba(6, 53, 31, .72); color: #fff; font-weight: 800; opacity: 0; transition: opacity 300ms ease; pointer-events: none; }
.profile-avatar-overlay svg, .profile-avatar-badge svg { width: 20px; height: 20px; fill: currentColor; }
.profile-avatar-control:hover .profile-avatar-overlay, .profile-avatar-control:focus-visible .profile-avatar-overlay { opacity: 1; }
.profile-avatar-badge { display: none; }
.profile-avatar-name { margin-top: 12px; font-size: 18px; }
.profile-avatar-section small { color: var(--muted); }
.profile-avatar-remove { min-height: 44px; border: 0; background: transparent; color: var(--accent); padding: 8px 12px; font: inherit; font-weight: 800; cursor: pointer; }
.profile-avatar-remove:hover { color: var(--secondary); text-decoration: underline; }
.profile-avatar-remove[hidden] { display: none; }
.profile-avatar-status { min-height: 24px; margin: 2px 0 0; color: var(--primary); font-weight: 700; text-align: center; }
.profile-avatar-status.is-error { color: var(--accent); }
.profile-avatar-dialog { width: min(420px, calc(100% - 32px)); border: 0; border-radius: 8px; padding: 24px; box-shadow: 0 24px 64px rgba(16, 24, 40, .28); }
.profile-avatar-dialog::backdrop { background: rgba(0, 0, 0, .56); }
.profile-avatar-dialog h2 { margin: 0 0 6px; font-size: 22px; }
.profile-avatar-dialog p { margin: 0 0 20px; color: var(--muted); }
.profile-avatar-dialog-actions { display: flex; justify-content: flex-end; gap: 10px; }
.profile-avatar-confirm-remove { background: var(--accent); }
.public-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-bottom: 18px; }
.stat { background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 18px; box-shadow: 0 8px 24px rgba(16,24,40,.05); }
.stat span { color: var(--muted); display: block; }
.stat strong { font-size: 34px; color: var(--primary); }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.form-grid label { display: grid; gap: 6px; font-weight: 800; }
.wide { grid-column: 1 / -1; }
.delete-panel { border-color: #FECACA; }
.modal-backdrop { position: fixed; inset: 0; z-index: 100; background: rgba(0,0,0,.56); display: grid; place-items: center; padding: 18px; }
.modal-backdrop[hidden] { display: none; }
.modal-card { width: min(480px, 100%); background: #fff; border-radius: 8px; padding: 22px; box-shadow: var(--shadow); position: relative; }
.modal-close { position: absolute; top: 10px; right: 12px; border: 0; background: transparent; font-size: 26px; cursor: pointer; }
.policy-head { text-align: center; }
.policy-layout { margin-bottom: 34px; }
.policy-content { font-size: 18px; max-width: 900px; margin: 0 auto; }
.faq-list { display: grid; gap: 12px; margin-bottom: 34px; }
.faq-item { border: 1px solid var(--line); border-radius: 8px; padding: 15px 18px; background: #fff; box-shadow: 0 8px 24px rgba(16,24,40,.04); }
.faq-item summary { font-weight: 900; cursor: pointer; }
.faq-item p { margin: 12px 0 0; color: var(--muted); }
.author-hero { display: grid; grid-template-columns: 180px 1fr; gap: 22px; align-items: center; margin-top: 30px; margin-bottom: 24px; }
.author-hero img { width: 180px; height: 180px; border-radius: 50%; border: 5px solid var(--soft); }
.author-hero h1 { margin: 10px 0 6px; font-size: 42px; }
.author-social { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.author-social a { border: 1px solid var(--line); border-radius: 999px; padding: 6px 10px; font-weight: 800; }
.author-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-bottom: 28px; }
.timeline-item { display: grid; gap: 3px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.timeline-item:last-child { border-bottom: 0; }
.timeline-item span, .timeline-item small { color: var(--muted); }
.profile-page { padding: 28px 0; }
.profile-hero { display: grid; grid-template-columns: 180px 1fr; gap: 20px; align-items: center; margin-bottom: 24px; }
.profile-hero img { width: 180px; height: 180px; border-radius: 8px; }
.profile-hero dl { display: grid; grid-template-columns: max-content 1fr; gap: 6px 14px; }
.match-detail h1 { font-size: 42px; margin: 12px 0; }

@media (max-width: 1100px) {
  .lead-layout, .news-layout, .dashboard-grid { grid-template-columns: 1fr; }
  .topic-grid, .compact-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 900px) {
  .navbar { flex-wrap: wrap; padding: 12px 0; }
  .nav-toggle { display: inline-block; margin-left: auto; }
  .nav-links { display: none; width: 100%; flex-direction: column; align-items: flex-start; }
  .nav-links.open { display: flex; }
  .search-box { width: 100%; }
  .auth-links { width: 100%; justify-content: flex-start; }
  .article-layout, .footer-grid { grid-template-columns: 1fr; }
  .account-layout { grid-template-columns: 1fr; }
  .public-stats { grid-template-columns: 1fr; }
  .hero-story { min-height: 390px; }
  .footer-bottom .container { flex-direction: column; }
  .profile-avatar-control { width: 110px; height: 110px; flex-basis: 110px; }
}

@media (max-width: 1100px) {
  .site-header { overflow: visible; }
  .top-strip { font-size: 12px; padding: 5px 10px; }
  .navbar {
    position: relative;
    min-height: 58px;
    padding: 7px 0;
    flex-wrap: wrap;
    gap: 6px;
  }
  .brand {
    flex: 1 1 auto;
    min-width: 0;
    font-size: 25px;
    line-height: 1;
  }
  .mobile-header-actions {
    display: flex;
    align-items: center;
    gap: 4px;
    flex: 0 0 auto;
  }
  .mobile-icon-btn, .nav-toggle {
    width: 44px;
    height: 44px;
    display: inline-grid;
    place-items: center;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: var(--primary-dark);
    padding: 0;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
  }
  .mobile-icon-btn svg {
    width: 22px;
    height: 22px;
    fill: currentColor;
  }
  .nav-toggle {
    flex: 0 0 44px;
    margin-left: 0;
    font-size: 22px;
    line-height: 1;
  }
  .mobile-icon-btn:focus-visible, .nav-toggle:focus-visible,
  .mobile-search-panel input:focus-visible,
  .mobile-search-panel button:focus-visible {
    outline: 2px solid var(--secondary);
    outline-offset: 2px;
  }
  .search-box, .auth-links, .desktop-theme-toggle {
    display: none;
  }
  .nav-links {
    display: none;
    flex: 0 0 100%;
    order: 5;
    width: 100%;
    align-items: stretch;
    gap: 2px;
    margin-top: 6px;
    padding: 8px 0 4px;
    border-top: 1px solid var(--line);
  }
  .nav-links.open {
    display: flex;
  }
  .mobile-search-panel {
    position: absolute;
    top: calc(100% + 8px);
    left: 10px;
    right: 10px;
    z-index: 80;
    height: 48px;
    align-items: center;
    gap: 10px;
    padding: 0 10px 0 14px;
    background: #fff;
    border: 1px solid rgba(16, 24, 40, .08);
    border-radius: 12px;
    box-shadow: 0 16px 38px rgba(16, 24, 40, .18);
    opacity: 0;
    pointer-events: none;
    transform: translateY(-8px);
    transition: opacity 250ms ease, transform 250ms ease;
  }
  .mobile-search-panel.open {
    display: flex;
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
  }
  .mobile-search-panel svg {
    width: 21px;
    height: 21px;
    flex: 0 0 auto;
    fill: var(--muted);
  }
  .mobile-search-panel input {
    width: 100%;
    min-width: 0;
    height: 46px;
    border: 0;
    border-radius: 12px;
    padding: 0;
    font: inherit;
    font-size: 15px;
    outline: 0;
  }
  .mobile-search-panel button {
    width: 44px;
    height: 44px;
    flex: 0 0 44px;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: var(--muted);
    font-size: 25px;
    line-height: 1;
    cursor: pointer;
  }
  .mobile-search-panel .suggestions {
    top: 56px;
    left: 0;
    right: 0;
    border-radius: 12px;
    z-index: 90;
  }
  .mobile-user-panel {
    position: absolute;
    top: calc(100% + 8px);
    right: 10px;
    z-index: 85;
    width: min(220px, calc(100vw - 20px));
    padding: 8px;
    background: #fff;
    border: 1px solid rgba(16, 24, 40, .08);
    border-radius: 12px;
    box-shadow: 0 16px 38px rgba(16, 24, 40, .18);
    opacity: 0;
    pointer-events: none;
    transform: translateY(-8px);
    transition: opacity 250ms ease, transform 250ms ease;
  }
  .mobile-user-panel.open {
    display: block;
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
  }
  .mobile-user-panel a, .mobile-user-panel button {
    display: flex;
    align-items: center;
    width: 100%;
    min-height: 44px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: var(--text);
    padding: 10px 12px;
    font: inherit;
    font-weight: 900;
    text-align: left;
    cursor: pointer;
  }
  .mobile-user-panel a:hover, .mobile-user-panel button:hover {
    background: var(--soft);
  }
}

@media (max-width: 360px) {
  .navbar {
    column-gap: 2px;
  }
  .brand {
    max-width: calc(100% - 136px);
    font-size: 21px;
  }
}

@media (max-width: 620px) {
  .container { width: min(100% - 20px, 1180px); }
  .hero-content { left: 18px; right: 18px; bottom: 18px; }
  .news-grid, .topic-grid, .compact-grid { grid-template-columns: 1fr; }
  .topic-link { grid-template-columns: 96px 1fr; }
  .author-hero, .author-grid { grid-template-columns: 1fr; }
  .author-hero img { width: 150px; height: 150px; }
  .profile-hero { grid-template-columns: 1fr; }
  .profile-hero img { width: 100%; height: auto; aspect-ratio: 1; }
  .newsletter-inner { align-items: flex-start; flex-direction: column; }
  .newsletter form, .wide-search { flex-direction: column; width: 100%; }
  .newsletter input { min-width: 0; width: 100%; }
  .form-grid { grid-template-columns: 1fr; }
  .form-row { align-items: flex-start; flex-direction: column; }
  .profile-avatar-control { width: 90px; height: 90px; flex-basis: 90px; overflow: visible; }
  .profile-avatar-control img { overflow: hidden; }
  .profile-avatar-overlay { display: none; }
  .profile-avatar-badge { position: absolute; right: -4px; bottom: -2px; width: 34px; height: 34px; display: grid; place-items: center; border: 3px solid #fff; border-radius: 50%; background: var(--secondary); color: #fff; box-shadow: 0 5px 14px rgba(16, 24, 40, .22); }
  .profile-avatar-dialog-actions .btn { min-height: 44px; }
}

/* Phase F: shared interaction, accessibility, and responsive polish. */
:root {
  --surface: #FFFFFF;
  --surface-raised: #FFFFFF;
  --surface-muted: #F5F8F6;
  --focus: #F7931E;
  --header-bg: rgba(255, 255, 255, .97);
  --control-bg: #FFFFFF;
  color-scheme: light;
}

html { scroll-behavior: smooth; }
body { min-width: 320px; overflow-x: hidden; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
button, input, textarea, select { letter-spacing: 0; }
button, a, input, textarea, select, summary { -webkit-tap-highlight-color: transparent; }
:where(a, button, input, textarea, select, summary, [role="button"]):focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}
.skip-link { position: fixed; top: 10px; left: 10px; z-index: 999; padding: 10px 14px; border-radius: 6px; background: var(--primary-dark); color: #fff; font-weight: 900; transform: translateY(-160%); transition: transform 180ms ease; }
.skip-link:focus { transform: translateY(0); }
.reading-progress { position: fixed; inset: 0 0 auto; z-index: 100; height: 3px; background: transparent; pointer-events: none; }
.reading-progress span { display: block; width: 0; height: 100%; background: var(--secondary); transition: width 80ms linear; }
.site-header { background: var(--header-bg); }
.nav-links a { position: relative; min-height: 44px; display: inline-flex; align-items: center; }
.nav-links a::after { content: ""; position: absolute; left: 0; right: 0; bottom: 4px; height: 2px; border-radius: 2px; background: var(--secondary); transform: scaleX(0); transition: transform 180ms ease; }
.nav-links a:hover::after, .nav-links a.active::after { transform: scaleX(1); }
.nav-links a.active { color: var(--primary); }
.theme-toggle { flex: 0 0 44px; width: 44px; height: 44px; display: inline-grid; place-items: center; border: 1px solid var(--line); border-radius: 50%; background: var(--control-bg); color: var(--primary-dark); cursor: pointer; transition: color 180ms ease, background 180ms ease, border-color 180ms ease; }
.theme-toggle:hover { color: var(--secondary); border-color: var(--secondary); }
.theme-toggle svg { width: 20px; height: 20px; fill: currentColor; }
.user-menu.open, .auth-links:focus-within .user-menu { display: block; }
.user-menu, .suggestions, .mobile-search-panel, .mobile-user-panel { background: var(--surface-raised); }
.suggestions { z-index: 95; max-height: min(420px, 65vh); overflow-y: auto; }
.suggestions a { display: grid; gap: 1px; color: var(--text); }
.suggestions a:hover, .suggestions a[aria-selected="true"] { background: var(--surface-muted); }
.suggestions small { color: var(--muted); font-weight: 700; text-transform: capitalize; }
.suggestions .suggestion-status { display: flex; align-items: center; gap: 9px; padding: 12px; color: var(--muted); font-weight: 700; }
.suggestion-spinner { width: 16px; height: 16px; border: 2px solid var(--line); border-top-color: var(--primary); border-radius: 50%; animation: cricapi-spin .7s linear infinite; }
.login-link, .register-link, .user-menu-trigger, .btn { min-height: 44px; display: inline-flex; align-items: center; justify-content: center; transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease, border-color 180ms ease; }
.register-link:hover, .btn:hover:not(:disabled) { transform: translateY(-1px); box-shadow: 0 8px 18px rgba(16, 24, 40, .12); }
.btn:disabled, button[aria-disabled="true"] { opacity: .58; cursor: not-allowed; box-shadow: none; transform: none; }
.panel, .article-card, .compact-card, .profile-card, .faq-item, .stat { background: var(--surface-raised); }
.article-card, .compact-card, .profile-card, .match-card { border-color: var(--line); }
.article-card h3 a, .compact-card span, .headline-link, .ranked-link, .topic-link { overflow-wrap: anywhere; }
.article-card h3 { min-height: 2.56em; }
.article-card p { display: -webkit-box; overflow: hidden; -webkit-box-orient: vertical; -webkit-line-clamp: 3; }
.thumb, .article-card .thumb img, .compact-card img, .topic-link img, .profile-card img { background: var(--surface-muted); }
.headline-link, .ranked-link, .topic-link, .match-row { transition: color 180ms ease, background 180ms ease; }
.headline-link:hover, .ranked-link:hover, .topic-link:hover, .match-row:hover { color: var(--primary); background: var(--surface-muted); }
.card-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; padding-bottom: 34px; }
.category-blocks, .section-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; margin-bottom: 24px; }
.match-row { display: grid; gap: 3px; padding: 14px 4px; border-bottom: 1px solid var(--line); }
.match-row:last-child { border-bottom: 0; }
.match-row span { color: var(--muted); font-size: 14px; }
.lead-layout > *, .news-layout > *, .dashboard-grid > *, .topic-grid > *,
.section-grid > *, .category-blocks > *, .card-list > * { min-width: 0; }
.points-table-wrap { width: 100%; max-width: 100%; overflow-x: auto; overscroll-behavior-inline: contain; }
.points-table { min-width: 560px; }
.points-table tbody tr:hover { background: var(--surface-muted); }
.page-head { max-width: 1180px; }
.page-head p { max-width: 760px; margin: 0; color: var(--muted); }
.page-head a { color: var(--primary); font-weight: 800; }
.page-head h1 { line-height: 1.15; overflow-wrap: anywhere; }
.hero-content h1 { font-size: 48px; }
.article-main { min-width: 0; }
.article-main > h1 { font-size: 48px; overflow-wrap: anywhere; }
.breadcrumbs { display: flex; flex-wrap: wrap; gap: 6px; color: var(--muted); font-size: 14px; }
.breadcrumbs a:hover { color: var(--primary); text-decoration: underline; }
.article-content { max-width: 780px; line-height: 1.82; overflow-wrap: anywhere; }
.article-content h2 { margin: 34px 0 12px; font-size: 29px; line-height: 1.3; }
.article-content h3 { margin: 28px 0 10px; font-size: 23px; line-height: 1.35; }
.article-content a { color: var(--primary); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.article-content blockquote { margin: 24px 0; padding: 14px 18px; border-left: 4px solid var(--secondary); background: var(--surface-muted); font-size: 20px; }
.article-content pre { max-width: 100%; overflow-x: auto; padding: 16px; border-radius: 8px; background: #101914; color: #E8F5ED; font: 14px/1.65 ui-monospace, SFMono-Regular, Consolas, monospace; }
.article-content code { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; }
.article-content table { display: block; max-width: 100%; overflow-x: auto; border-collapse: collapse; }
.article-content th, .article-content td { min-width: 130px; padding: 10px 12px; border: 1px solid var(--line); text-align: left; }
.article-content iframe, .article-content video { width: 100%; max-width: 100%; aspect-ratio: 16 / 9; border: 0; border-radius: 8px; }
.article-content figure { margin: 26px 0; }
.article-content figcaption { margin-top: 8px; color: var(--muted); font-size: 14px; text-align: center; }
.article-tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 22px 0; }
.article-author-card { display: grid; grid-template-columns: 64px 1fr; gap: 14px; align-items: center; margin: 26px 0; padding: 16px; border-block: 1px solid var(--line); }
.article-author-card img { width: 64px; height: 64px; border-radius: 50%; background: var(--surface-muted); }
.article-author-card strong, .article-author-card span { display: block; }
.article-author-card span { color: var(--muted); font-size: 14px; }
.share-box { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.share-box a { min-height: 40px; display: inline-flex; align-items: center; margin: 0; padding: 7px 11px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface-raised); }
.share-box a:hover { border-color: var(--primary); background: var(--surface-muted); }
.comments-box textarea { min-height: 130px; resize: vertical; }
.empty-state, .error-state { grid-column: 1 / -1; display: grid; justify-items: start; gap: 10px; padding: 30px; border: 1px dashed var(--line); border-radius: 8px; background: var(--surface-muted); }
.empty-state h2, .empty-state p, .error-state h1, .error-state p { margin: 0; }
.empty-state-icon, .error-state-code { color: var(--primary); font-size: 48px; font-weight: 900; line-height: 1; }
.search-results { margin-bottom: 38px; }
.search-result { display: grid; grid-template-columns: 1fr auto; gap: 12px; align-items: center; }
.search-result mark { padding: 0 2px; border-radius: 3px; background: #FDE68A; color: #422006; }
.result-type { padding: 3px 8px; border-radius: 999px; background: var(--surface-muted); color: var(--muted); font-size: 12px; text-transform: capitalize; }
.contact-card { width: min(600px, 100%); border: 1px solid var(--line); border-radius: 8px; padding: 30px; background: var(--surface-raised); box-shadow: var(--shadow); }
.contact-card h1 { margin: 16px 0 8px; font-size: 36px; }
.contact-card > p { margin: 0 0 28px; color: var(--muted); }
.field-input, .stack input:not([type="checkbox"]):not([type="radio"]), .stack textarea, .form-grid input:not([type="checkbox"]):not([type="radio"]), .form-grid textarea, .form-grid select {
  width: 100%; min-height: 46px; border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; background: var(--control-bg); color: var(--text); font: inherit; transition: border-color 180ms ease, box-shadow 180ms ease;
}
.stack input:focus, .stack textarea:focus, .form-grid input:focus, .form-grid textarea:focus, .form-grid select:focus, .wide-search input:focus, .search-box input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(10, 92, 54, .14); outline: 0; }
.form-message { padding: 12px 14px; border-radius: 8px; font-weight: 800; }
.form-message { white-space: pre-line; }
.form-message.success { background: #E9F8EF; color: #075C36; }
.form-message.error { background: #FDECEC; color: #A11220; }
.footer a { min-height: 32px; width: fit-content; }
.footer-social { display: flex; flex-wrap: wrap; gap: 8px; }
.footer-social a { margin: 0; padding: 5px 9px; border: 1px solid rgba(255,255,255,.16); border-radius: 6px; }
.ticker-track:hover, .ticker-track:focus-within { animation-play-state: paused; }
.newsletter-status { display: block; align-self: center; color: #fff; font-size: 13px; font-weight: 700; }

html[data-theme="dark"] {
  --text: #EDF4EF;
  --muted: #A9B7AF;
  --line: #2B3B32;
  --bg: #101713;
  --soft: #17221B;
  --surface: #101713;
  --surface-raised: #17221B;
  --surface-muted: #1E2C23;
  --header-bg: rgba(16, 23, 19, .97);
  --control-bg: #142019;
  --shadow: 0 14px 36px rgba(0, 0, 0, .28);
  color-scheme: dark;
}
html[data-theme="dark"] .site-header,
html[data-theme="dark"] .panel,
html[data-theme="dark"] .article-card,
html[data-theme="dark"] .compact-card,
html[data-theme="dark"] .profile-card,
html[data-theme="dark"] .match-card,
html[data-theme="dark"] .faq-item,
html[data-theme="dark"] .public-auth-card,
html[data-theme="dark"] .account-helper-card,
html[data-theme="dark"] .stat,
html[data-theme="dark"] .modal-card,
html[data-theme="dark"] .profile-avatar-dialog { background: var(--surface-raised); color: var(--text); }
html[data-theme="dark"] .match-panel { background: var(--surface-raised); }
html[data-theme="dark"] .ticker, html[data-theme="dark"] .ticker-inner { background: #241D14; border-color: #5C4328; }
html[data-theme="dark"] .login-link, html[data-theme="dark"] .user-menu-trigger, html[data-theme="dark"] .ghost-btn, html[data-theme="dark"] .btn-google { background: var(--control-bg); color: var(--text); }
html[data-theme="dark"] .mobile-icon-btn, html[data-theme="dark"] .nav-toggle, html[data-theme="dark"] .theme-toggle { color: #DDECE3; }
html[data-theme="dark"] .brand { color: #5FD394; }
html[data-theme="dark"] .search-result mark { background: #7C5B16; color: #FFF7D6; }
html[data-theme="dark"] .newsletter { background: #07502F; }

@media (max-width: 1180px) {
  .navbar { gap: 12px; }
  .nav-links { gap: 10px; font-size: 14px; }
  .search-box { width: 210px; }
  .desktop-theme-toggle { flex-basis: 40px; width: 40px; height: 40px; }
}
@media (max-width: 1020px) {
  .card-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .article-layout { grid-template-columns: minmax(0, 1fr) 280px; }
}
@media (min-width: 769px) and (max-width: 900px) {
  .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .desktop-theme-toggle { order: 4; }
}
@media (max-width: 900px) {
  .article-layout { grid-template-columns: 1fr; }
  .article-layout > .sidebar { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .category-blocks, .section-grid { grid-template-columns: 1fr; }
  .desktop-theme-toggle { display: none; }
}
@media (max-width: 768px) {
  .nav-links { max-height: min(62vh, 520px); overflow-y: auto; }
  .nav-links a { width: 100%; padding-inline: 8px; border-radius: 6px; }
  .nav-links a::after { display: none; }
  .nav-links a.active { background: var(--surface-muted); }
  .mobile-user-panel form { margin: 0; }
  .hero-content h1, .article-main > h1 { font-size: 34px; }
  .hero-content p { font-size: 16px; }
  .article-content { font-size: 18px; }
  .article-content h2 { font-size: 25px; }
  .page-head h1 { font-size: 36px; }
  .card-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer { padding-top: 34px; }
  .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 620px) {
  .lead-layout { padding-top: 18px; }
  .hero-story { min-height: 430px; }
  .hero-content h1, .article-main > h1 { font-size: 30px; line-height: 1.2; }
  .hero-content p { display: -webkit-box; overflow: hidden; -webkit-box-orient: vertical; -webkit-line-clamp: 3; }
  .page-head { padding-top: 26px; }
  .page-head h1 { font-size: 32px; }
  .card-list, .article-layout > .sidebar, .footer-grid { grid-template-columns: 1fr; }
  .article-card h3 { min-height: auto; }
  .article-image { margin-inline: 0; }
  .article-actions .btn { width: 100%; }
  .article-actions form { width: 100%; }
  .share-box { align-items: stretch; }
  .share-box strong { width: 100%; }
  .share-box a { flex: 1 1 calc(50% - 8px); justify-content: center; }
  .contact-card { padding: 22px 18px; }
  .search-result { grid-template-columns: 1fr; gap: 4px; }
  .result-type { width: fit-content; }
}
@media (max-width: 425px) {
  .top-strip { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .brand { font-size: 23px; }
  .mobile-header-actions { gap: 0; }
  .mobile-icon-btn, .nav-toggle { width: 42px; height: 42px; flex-basis: 42px; }
  .ticker-inner { gap: 10px; }
  .ticker strong { padding: 10px 12px; font-size: 13px; }
  .hero-story { min-height: 400px; }
  .hero-content { left: 16px; right: 16px; }
  .newsletter h2 { font-size: 26px; }
}
@media (max-width: 340px) {
  .container { width: calc(100% - 16px); }
  .brand { max-width: calc(100% - 128px); font-size: 20px; }
  .mobile-icon-btn, .nav-toggle { width: 40px; height: 40px; flex-basis: 40px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .ticker-track { position: static; transform: none; animation: none; overflow-x: auto; }
}
