/* Alumni Network (Competition-Backend, shared). Sits inside the site's own .awrapper/.cbox, so fonts,
   text colour and box background come from each competition's CSS. Lines and tints are derived from
   the text colour (currentColor), which keeps them right on dark and light sites alike. */

.al_box {
  --al-line: color-mix(in srgb, currentColor 22%, transparent);
  --al-tint: color-mix(in srgb, currentColor 6%, transparent);
  --al-tint2: color-mix(in srgb, currentColor 12%, transparent);
  --al-soft: color-mix(in srgb, currentColor 65%, transparent);
  --al-link: hsl(220, 60%, 65%);
  --al-ok: hsl(130, 55%, 45%);
  --al-err: hsl(5, 75%, 60%);
  width: min(1120px, calc(100% - 40px)) !important;
  max-width: none !important;
  text-align: left;
  box-sizing: border-box;
}
.al_box * { box-sizing: border-box; }
.al_box h3 { margin-bottom: 25px; }
.al_box a { color: var(--al-link); }
.al_box a:hover { text-decoration: underline; }
.al_box p { line-height: 1.55; }

/* user bar + tabs */
.al_userbar { display: flex; justify-content: flex-end; align-items: center; gap: 18px; flex-wrap: wrap; font-size: 14px; margin-bottom: 12px; }
.al_userbar a, .al_userbar button { color: inherit !important; background: none; border: 0; font: inherit; cursor: pointer; padding: 0; }
.al_userbar form { margin: 0; display: inline; }
.al_me { display: inline-flex; align-items: center; gap: 8px; font-weight: bold; }
.al_nav { display: flex; flex-wrap: wrap; gap: 6px; border-top: 1px solid var(--al-line); border-bottom: 1px solid var(--al-line); padding: 10px 0; margin-bottom: 28px; }
.al_nav a, .al_subnav a {
  color: inherit !important; padding: 7px 13px; border-radius: 20px; font-size: 14px; white-space: nowrap;
  border: 1px solid transparent; text-decoration: none !important;
}
@media (hover: hover) { .al_nav a:hover, .al_subnav a:hover { background: var(--al-tint2); } }
.al_nav a.al_active, .al_subnav a.al_active { border-color: currentColor; background: var(--al-tint2); font-weight: bold; }
.al_subnav { display: flex; flex-wrap: wrap; gap: 6px; margin: 5px 0 20px; }

/* layout */
.al_cols { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 28px; align-items: start; }
.al_grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.al_center { text-align: center; }
.al_login { max-width: 650px; margin: 0 auto; }

/* cards */
.al_card { border: 1px solid var(--al-line); border-radius: 10px; padding: 16px 18px; margin-bottom: 16px; background: var(--al-tint); display: block; }
.al_card h5 { font-size: 17px; margin: 0 0 10px; }
.al_card h5 a { color: inherit; }
.al_card p:last-child { margin-bottom: 0; }
.al_box h4 + p, .al_box h4 + .al_meta { margin-top: 4px; }
.al_meta { font-size: 13px; color: var(--al-soft); margin-bottom: 8px; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.al_pill { display: inline-block; font-size: 12px; padding: 2px 9px; border-radius: 12px; border: 1px solid currentColor; font-weight: bold; color: inherit; }
.al_pill_soft { border-color: var(--al-line); font-weight: normal; }
.al_pill_gold { border-color: hsl(45, 95%, 55%); color: hsl(45, 95%, 58%); background: color-mix(in srgb, hsl(45, 95%, 55%) 14%, transparent); }
.al_more { font-weight: bold; font-size: 14px; display: inline-block; margin-top: 6px; }
.al_hint { font-size: 13px; color: var(--al-soft); }
.al_empty { color: var(--al-soft); font-style: italic; }
.al_clamp { display: -webkit-box; -webkit-line-clamp: 8; -webkit-box-orient: vertical; overflow: hidden; white-space: normal; }
.al_clamp3 { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

/* messages */
.al_msg { padding: 12px 15px; border-radius: 8px; margin-bottom: 18px; border: 1px solid; font-weight: bold; }
.al_msg_ok { border-color: var(--al-ok); color: var(--al-ok); }
.al_msg_err { border-color: var(--al-err); color: var(--al-err); }
.al_msg_info { border-color: var(--al-line); background: var(--al-tint); }
.al_msg a { color: inherit; text-decoration: underline; }

/* avatars + people */
.al_av { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; flex-shrink: 0; border: 1px solid var(--al-line); }
.al_av_ini { display: inline-flex; align-items: center; justify-content: center; background: var(--al-tint2); font-weight: bold; font-size: 15px; }
.al_av_xs { width: 26px; height: 26px; font-size: 11px; }
.al_av_sm { width: 40px; height: 40px; font-size: 14px; }
.al_av_lg { width: 110px; height: 110px; font-size: 34px; border-width: 3px; }
.al_person { display: flex; align-items: center; gap: 10px; color: inherit !important; text-decoration: none !important; line-height: 1.3; min-width: 0; }
.al_person small { color: var(--al-soft); }
a.al_person:hover b { text-decoration: underline; }
.al_people { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.al_peer_head { display: flex; gap: 22px; align-items: center; margin-bottom: 14px; }
.al_name { font-size: 24px; font-weight: bold; margin-bottom: 6px; }
.al_kicker { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--al-soft); margin-bottom: 4px; }
.al_facts { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 14px; color: var(--al-soft); margin-bottom: 8px; }
.al_facts i { width: 15px; text-align: center; }
.al_peer_contact { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; margin: 14px 0 6px; }
.al_email { font-family: monospace; font-size: 14px; }
.al_btn { display: inline-block; padding: 9px 18px; border-radius: 20px; border: 1px solid currentColor; color: inherit !important; font-weight: bold; text-decoration: none !important; }
.al_btn:hover { background: var(--al-tint2); }
.al_profile h5 { margin-top: 18px; }

/* news */
.al_news { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 18px; padding: 14px; }
.al_news:not(:has(.al_news_img)) { grid-template-columns: minmax(0, 1fr); }
.al_news_img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 8px; }
.al_news h5 { font-size: 18px; }
.al_pager { display: flex; justify-content: space-between; margin: 10px 0 20px; font-weight: bold; }
.al_mini_post { border-top: 1px solid var(--al-line); padding-top: 8px; margin-top: 8px; }
.al_mini_post small { color: var(--al-soft); }
.al_mini_post p { margin: 4px 0; }

/* groups */
.al_search { width: 100%; margin: 0 0 14px !important; }
.al_city_list { max-height: 520px; overflow-y: auto; }
.al_city { display: block; padding: 6px 8px; border-radius: 6px; color: inherit !important; text-decoration: none !important; }
.al_city small { color: var(--al-soft); }
.al_city:hover, .al_city.al_active { background: var(--al-tint2); }
.al_post p { margin: 10px 0; }
.al_post_img { max-width: 100%; border-radius: 8px; margin-top: 4px; }
.al_compose textarea { min-height: 110px; }
.al_link_btn { background: none; border: 0; color: var(--al-soft); cursor: pointer; font: inherit; font-size: 13px; padding: 0; }
.al_score { font-size: 12px; font-weight: bold; color: hsl(45, 90%, 55%); white-space: nowrap; }
.al_flag { font-size: 13px; color: var(--al-soft); margin-top: 6px; }
.al_flag summary { cursor: pointer; list-style: none; display: inline-block; }
.al_flag summary::-webkit-details-marker { display: none; }
.al_flag[open] summary { color: var(--al-err); }
.al_flag textarea { min-height: 70px; margin: 8px 0 4px; }
.al_flag_send { font-weight: bold; color: var(--al-link); }
.al_flag_done { font-size: 13px; color: var(--al-soft); }

/* tables (leaderboard, constants) */
.al_table_wrap { overflow-x: auto; }
.al_table { width: 100%; border-collapse: collapse; font-size: 14px; }
.al_table th { text-align: left; font-size: 13px; color: var(--al-soft); border-bottom: 1px solid var(--al-line); padding: 8px; }
.al_table td { border-bottom: 1px solid var(--al-line); padding: 9px 8px; vertical-align: middle; }
.al_rank { font-weight: bold; font-size: 18px; text-align: center; width: 48px; }
.al_gold { color: hsl(45, 95%, 55%); } .al_silver { color: hsl(210, 10%, 70%); } .al_bronze { color: hsl(28, 60%, 55%); }
.al_num { text-align: center; font-weight: bold; }
.al_me_row td { background: var(--al-tint2); }
.al_tag { display: inline-block; font-size: 12px; padding: 2px 8px; margin: 2px 3px 2px 0; border-radius: 10px; border: 1px solid var(--al-line); }
.al_tag_hi { border-color: hsl(45, 90%, 55%); color: hsl(45, 90%, 55%); font-weight: bold; }
.al_tag_silver { border-color: hsl(210, 12%, 72%); color: hsl(210, 12%, 72%); font-weight: bold; }
.al_tag_bronze { border-color: hsl(28, 62%, 55%); color: hsl(28, 62%, 55%); font-weight: bold; }
.al_board_note { margin-top: 18px; }
.al_filter select { max-width: 280px; }
.al_mono { font-family: monospace; white-space: nowrap; }

/* opportunities, resources, stories */
.al_opps { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.al_opp { margin: 0; display: flex; flex-direction: column; }
.al_opp p { flex: 1; }
.al_opp_links { display: flex; gap: 18px; }
.al_res_link { color: inherit !important; text-decoration: none !important; margin: 0; }
.al_res_link:hover { background: var(--al-tint2); }
.al_res_link h5 i { font-size: 12px; color: var(--al-soft); }
.al_grid2 > .al_card { margin: 0; }
.al_formula { overflow-x: auto; padding: 4px 0; }
.al_calendar .al_event { display: flex; gap: 18px; align-items: flex-start; }
.al_event_date { min-width: 74px; text-align: center; border: 1px solid var(--al-line); border-radius: 8px; padding: 6px; font-size: 12px; }
.al_event_date b { display: block; font-size: 24px; }
.al_stories { display: grid; gap: 16px; margin-bottom: 26px; }
.al_story { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 18px; margin: 0; }
.al_story:not(:has(.al_story_img)) { grid-template-columns: minmax(0, 1fr); }
.al_story_img { width: 100%; border-radius: 8px; object-fit: cover; max-height: 220px; }
.al_story details { margin-top: 10px; }
.al_gallery { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.al_gallery img { height: 110px; border-radius: 6px; object-fit: cover; }
.al_story summary { cursor: pointer; font-weight: bold; color: var(--al-link); }

/* forms */
.al_box label { display: block; font-weight: bold; font-size: 14px; margin: 12px 0 5px; }
.al_box label small { font-weight: normal; color: var(--al-soft); }
.al_check { display: flex !important; gap: 10px; align-items: flex-start; font-weight: normal !important; }
.al_check input[type='checkbox'] { width: auto !important; float: none !important; margin: 3px 0 0 !important; flex-shrink: 0; }
.al_file { cursor: pointer; font-weight: normal !important; }
.al_file input[type='file'] { display: block; margin-top: 6px; }
.al_form .final_submit, .al_compose .final_submit { margin-top: 16px; }
.al_inline_btn { width: auto !important; padding-left: 28px !important; padding-right: 28px !important; }
.al_photo_row { display: flex; gap: 22px; align-items: center; margin-bottom: 10px; }
.al_box .fail_msg { margin-bottom: 15px; }

@media only screen and (max-width: 900px) {
  .al_cols, .al_grid2, .al_opps { grid-template-columns: minmax(0, 1fr); }
  .al_news, .al_story { grid-template-columns: minmax(0, 1fr); }
  .al_news_img { aspect-ratio: auto; max-height: 360px; }
  .al_box { width: calc(100% - 20px) !important; margin: 10px !important; }
  .al_peer_head { flex-direction: column; text-align: center; }
  .al_peer_head .al_facts { justify-content: center; }
  .al_av_lg { width: 90px; height: 90px; }
  /* leaderboard: rank | person | rounds, the record tags on their own line below */
  .al_board tr:first-child { display: none; }
  .al_board tr { display: grid; grid-template-columns: 40px minmax(0, 1fr) 36px; align-items: center; border-bottom: 1px solid var(--al-line); padding: 8px 0; }
  .al_board td { border: 0; padding: 2px 4px; }
  .al_board td:nth-child(3) { grid-column: 1 / -1; grid-row: 2; padding-left: 44px; }
  .al_board td:nth-child(4) { grid-column: 3; grid-row: 1; }
  .al_tag { white-space: nowrap; }
}
