/* Competitions section (#events) and the phone "More" sheet. Uses the tokens from styles.css. */
.ev-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin: 4px 0 18px; }
.ev-stats button { display: grid; gap: 2px; text-align: left; padding: 14px 16px; border-radius: var(--r-m); background: var(--surface); border: 1px solid var(--line); cursor: pointer; min-width: 0; }
.ev-stats button:hover { border-color: var(--muted); }
.ev-stats button[aria-pressed="true"] { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.ev-stats b { font-size: 26px; font-weight: 600; line-height: 1.1; color: var(--ink); }
.ev-stats span { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ev-stats .pulse { width: 7px; height: 7px; }

.ev-seg button { display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 16px; border-radius: 9px; font-weight: 600; font-size: 14px; color: var(--muted); white-space: nowrap; border: 0; background: none; cursor: pointer; }
.ev-seg button[aria-selected="true"] { background: var(--surface); color: var(--ink); box-shadow: var(--shadow); }
.ev-seg .n, .ev-h .n { font: 600 11.5px var(--f-mono); opacity: .6; }

.ev-sec { margin-top: 22px; }
.ev-h { display: flex; align-items: center; gap: 8px; margin: 0 0 12px; font: 700 13px/1 var(--f-display); font-stretch: 112%; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.ev-h svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.ev-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 12px; }

.ev-card, .ev-ch { display: flex; gap: 14px; align-items: flex-start; text-align: left; padding: 14px; border-radius: var(--r-l); background: var(--surface); border: 1px solid var(--line); cursor: pointer; min-width: 0; width: 100%; transition: border-color .15s, transform .15s; }
.ev-card:hover, .ev-ch:hover { border-color: var(--muted); }
.ev-card:active, .ev-ch:active { transform: scale(.995); }
.ev-card.is-live { border-color: color-mix(in srgb, var(--kev) 45%, var(--line)); background: linear-gradient(180deg, color-mix(in srgb, var(--kev) 6%, var(--surface)), var(--surface) 60%); }
.ev-main { display: grid; gap: 5px; min-width: 0; flex: 1; }
.ev-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ev-live { display: inline-flex; align-items: center; gap: 6px; font: 700 11px/1 var(--f-display); font-stretch: 112%; letter-spacing: .08em; text-transform: uppercase; color: var(--kev); }
.ev-live .pulse { width: 7px; height: 7px; }
.ev-cd { font: 600 12px var(--f-mono); color: var(--accent); }
.is-live .ev-cd { color: var(--kev); }
.ev-title { font: 700 16.5px/1.22 var(--f-display); font-stretch: 106%; color: var(--ink); overflow-wrap: anywhere; unicode-bidi: plaintext; }
.ev-when { display: flex; gap: 6px; align-items: flex-start; font-size: 13px; color: var(--ink-2); }
.ev-when svg, .ev-tag svg, .ev-go svg, .ev-f-label svg, .ev-what summary svg, .ev-actions svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.ev-when svg { margin-top: 2px; }
.ev-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 3px; }
.ev-tag { display: inline-flex; align-items: center; gap: 4px; height: 24px; padding: 0 8px; border-radius: 7px; background: var(--surface-2); font-size: 12px; font-weight: 500; color: var(--ink-2); max-width: 100%; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.ev-tag svg { width: 13px; height: 13px; }
.ev-tag.w { background: var(--med-soft); color: var(--med); font-family: var(--f-mono); font-weight: 600; }

.ev-logo { flex: none; width: 54px; height: 54px; border-radius: 12px; overflow: hidden; background: var(--surface-2); border: 1px solid var(--line); display: grid; place-items: center; }
.ev-logo.big { width: 72px; height: 72px; border-radius: 16px; }
.ev-logo img { width: 100%; height: 100%; object-fit: contain; background: #fff; }
.ev-mono { width: 100%; height: 100%; display: grid; place-items: center; font: 800 18px var(--f-display); font-stretch: 112%; color: #fff; background: linear-gradient(135deg, hsl(var(--h) 55% 38%), hsl(calc(var(--h) + 40) 60% 28%)); }
.ev-logo.big .ev-mono { font-size: 24px; }

.ev-feature { display: grid; gap: 14px; width: 100%; text-align: left; margin: 0 0 18px; padding: 20px; border-radius: var(--r-l); border: 1px solid var(--mast-line); cursor: pointer; color: var(--mast-ink);
  background: radial-gradient(120% 140% at 100% 0%, color-mix(in srgb, var(--brand) 26%, transparent), transparent 55%), var(--mast); }
.ev-f-label { display: inline-flex; align-items: center; gap: 7px; font: 700 11.5px/1 var(--f-display); font-stretch: 112%; letter-spacing: .1em; text-transform: uppercase; color: var(--brand); }
.ev-f-row { display: flex; gap: 16px; align-items: center; min-width: 0; }
.ev-f-row > span:last-child { display: grid; gap: 4px; min-width: 0; }
.ev-f-title { font: 800 clamp(22px, 4vw, 30px)/1.05 var(--f-display); font-stretch: 118%; letter-spacing: -.01em; overflow-wrap: anywhere; unicode-bidi: plaintext; }
.ev-f-meta { color: var(--mast-muted); font-size: 13.5px; }
.ev-f-foot { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.ev-f-cd { font: 600 15px var(--f-mono); color: var(--brand); margin-right: 4px; }
.ev-feature .ev-tag { background: var(--mast-line); color: var(--mast-ink); }
.ev-feature .ev-tag.w { background: color-mix(in srgb, var(--med) 25%, transparent); color: #F2C443; }

.ev-ch { color: inherit; }
.ev-ch-ic { flex: none; width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); }
.ev-ch-ic.bounty { background: var(--low-soft); color: var(--low); }
.ev-ch-ic svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.ev-org { font-size: 12.5px; color: var(--muted); }
.ev-about { font-size: 13.5px; color: var(--ink-2); }
.ev-go { flex: none; color: var(--muted); padding-top: 2px; }

.ev-what { margin: 28px 0 12px; padding: 14px 16px; border-radius: var(--r-m); background: var(--surface); border: 1px solid var(--line); }
.ev-what summary { cursor: pointer; font-weight: 600; display: flex; align-items: center; gap: 8px; list-style: none; }
.ev-what summary::-webkit-details-marker { display: none; }
.ev-what p { margin: 10px 0 0; color: var(--ink-2); font-size: 14px; }

.ev-skel { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 12px; }
.ev-skel i { height: 118px; border-radius: var(--r-l); background: linear-gradient(90deg, var(--surface-2), var(--surface), var(--surface-2)); background-size: 200% 100%; animation: ev-shine 1.4s linear infinite; }
@keyframes ev-shine { to { background-position: -200% 0; } }
@media (prefers-reduced-motion: reduce) { .ev-skel i { animation: none; } }

.ev-sheet .ev-s-head { display: flex; gap: 16px; align-items: flex-start; }
.ev-sheet .ev-s-head h2 { margin: 6px 0 4px; font: 700 clamp(22px, 3.4vw, 30px)/1.12 var(--f-display); font-stretch: 112%; text-wrap: balance; overflow-wrap: anywhere; unicode-bidi: plaintext; }
.ev-kv { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 1px; margin: 0; border-radius: var(--r-m); overflow: hidden; background: var(--line); border: 1px solid var(--line); }
.ev-kv div { background: var(--surface); padding: 10px 14px; min-width: 0; }
.ev-kv dt { font-size: 11.5px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; font-weight: 600; }
.ev-kv dd { margin: 2px 0 0; font-size: 14px; overflow-wrap: anywhere; }
.ev-text { white-space: pre-line; margin: 0; overflow-wrap: anywhere; font-size: 14.5px; color: var(--ink-2); }

@media (max-width: 720px) {
  .ev-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .ev-stats button { padding: 11px 13px; }
  .ev-stats b { font-size: 22px; }
  .ev-seg { display: flex; overflow-x: auto; scrollbar-width: none; }
  .ev-seg button { flex: 1 0 auto; padding: 0 12px; justify-content: center; }
  .ev-grid, .ev-skel { grid-template-columns: 1fr; }
  .ev-card, .ev-ch { padding: 12px; gap: 12px; }
  .ev-logo { width: 46px; height: 46px; border-radius: 10px; }
  .ev-feature { padding: 16px; }
  .ev-actions .btn { flex: 1 1 100%; }
}

/* phone "More" sheet (tab bar) */
.more-list { display: grid; gap: 10px; padding: 18px max(16px, env(safe-area-inset-right, 0px)) 32px 16px; }
.more-list a { display: flex; align-items: center; gap: 14px; padding: 14px; border-radius: var(--r-l); background: var(--surface); border: 1px solid var(--line); }
.more-list a[aria-current="page"] { border-color: var(--accent); }
.more-list .mi { flex: none; width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); }
.more-list .mi svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.more-list b { display: block; font: 700 16px/1.2 var(--f-display); font-stretch: 106%; }
.more-list small { color: var(--muted); font-size: 13px; }

/* desktop masthead: the nav gained Competitions and Jobs, so tighten it until everything fits */
@media (max-width: 1700px) and (min-width: 861px) {
  .mast-in { gap: 14px; }
  .mainnav { gap: 2px; margin-left: 0; }
  .mainnav a { padding: 8px 9px; font-size: 14px; }
  .acct-btn .label, .lang-btn .label, .mast-actions .btn-app span { display: none; }
  .mast-actions .btn-app { padding: 0 11px; }
}
@media (max-width: 1240px) and (min-width: 861px) {
  .brand-word { display: none; }
  .mainnav a { padding: 7px 7px; font-size: 13.5px; }
}
@media (max-width: 1040px) and (min-width: 861px) {
  .mainnav a { padding: 6px 5px; font-size: 12.5px; }
  .mast-actions { gap: 2px; }
  .mast-actions .icon-btn:not(.lang-btn) { width: 36px; }
}
