/* GUFC academic competition system. A quiet ledger with a distinct navy/teal identity. */
:root {
  --ink: #102d3a;
  --muted: #61727a;
  --paper: #f6f5f0;
  --surface: #ffffff;
  --line: #d7dedb;
  --lime: #d8eae2;
  --pale: #e9f2ed;
  --dark: #102d3a;
  --teal: #007f73;
  --teal-dark: #00675e;
  --gold: #aa8249;
  --red: #a63f45;
  --radius: 8px;
}
html { scroll-padding-top: 128px; }
body { background: var(--paper); color: var(--ink); }
::selection { background: #c8e3d7; color: var(--ink); }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible,
textarea:focus-visible, summary:focus-visible { outline-color: var(--teal); }
.wrap { width: min(1280px, calc(100% - 80px)); }
header { background: var(--paper); border-bottom: 1px solid var(--line); }
.topbar { height: 72px; gap: 24px; }
.brand img { width: 208px; height: 52px; }
.main-nav { gap: 24px; }
.main-nav a { font-size: 14px; padding: 12px 0; }
.main-nav a.active { color: var(--teal-dark); }
.main-nav a.active:after { height: 2px; background: var(--teal); }
.nav-tools { gap: 8px; }
.nav-tools > .btn { background: var(--ink); color: white; border-color: var(--ink); }
.nav-tools > .btn:hover { background: #234855; }
.nav-search-btn { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 6px; background: transparent; color: var(--muted); font-size: 12px; }
.nav-search-btn .icon { width: 16px; height: 16px; }
.nav-search-btn kbd { font: inherit; color: var(--muted); padding: 0 4px; border: 1px solid var(--line); border-radius: 4px; }
.nav-search-btn:hover { border-color: var(--teal); color: var(--teal-dark); background: white; }
.lang-btn:hover, .icon-btn:hover { background: var(--pale); border-radius: 6px; }
.demo-strip { padding: 8px 0; background: #ebeee7; color: #5c6b60; }
.demo-strip .status-dot { background: var(--gold); }
.status-dot { background: var(--teal); }
.btn { border-radius: 6px; min-height: 44px; padding: 12px 16px; }
.btn:hover { border-color: #b2cac0; background: var(--pale); }
.btn.primary { background: var(--teal); border-color: var(--teal); }
.btn.primary:hover { background: var(--teal-dark); border-color: var(--teal-dark); }
.btn.accent { background: var(--lime); color: var(--ink); border-color: var(--lime); }
.btn.accent:hover { background: #ecf5ee; border-color: #ecf5ee; }
.text-link:hover { color: var(--teal); }
.text-link:hover > .icon { transform: translateX(2px); }
.text-link > .icon { transition: transform .25s var(--move); }

/* The masthead names the catalogue. The large horizontal block belongs to a competition. */
.platform-heading { padding: 16px 0; align-items: flex-end; }
.platform-title { display: grid; grid-template-columns: auto 1fr; column-gap: 16px; row-gap: 4px; }
.academic-kicker { display: block; grid-column: 2; grid-row: 1; align-self: center; color: var(--teal-dark); font-size: 12px; font-weight: 600; letter-spacing: .08em; margin: 0; }
.platform-title h1 { grid-column: 1; grid-row: 1; font-size: 30px; font-weight: 500; line-height: 1.25; letter-spacing: -.035em; }
.platform-title > span, .platform-title > p { grid-column: 1 / -1; display: block; font-size: 12px; color: var(--muted); margin-top: 0; }
.platform-shortcuts { gap: 24px; padding-bottom: 4px; }
.platform-shortcuts a:hover { color: var(--teal); }
.featured-region { border-radius: 8px; border: 1px solid var(--line); background: var(--ink); }
.competition-banner { min-height: 288px; padding: 24px 32px; grid-template-columns: minmax(0, 1.4fr) minmax(280px, .9fr); gap: 40px; background: var(--ink); overflow: hidden; }
.banner-ea, .banner-team { background: var(--ink); }
.banner-copy { display: flex; flex-direction: column; align-items: flex-start; justify-content: center; padding: 0 0 32px; animation: ftc-content-in .25s var(--move) both; }
.banner-meta { font-size: 12px; letter-spacing: .06em; color: #b5cec7; gap: 12px; margin-bottom: 12px; }
.banner-demo { padding: 4px 8px; background: #274850; color: #d8eae2; border-radius: 4px; letter-spacing: 0; }
.banner-copy h2 { font-size: 36px; font-weight: 500; letter-spacing: -.035em; line-height: 1.2; max-width: 640px; }
.banner-copy > p { font-size: 14px; color: #bfd0d3; margin-top: 12px; max-width: 520px; }
.banner-facts { color: #d6e3e3; gap: 16px; font-size: 12px; margin: 12px 0 16px; }
.banner-lower { display: flex; align-items: center; gap: 24px; width: 100%; }
.banner-copy .btn { min-height: 44px; font-size: 14px; padding: 12px 16px; }
.banner-award-inline { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: #b5c9cb; }
.banner-award-inline small { font-size: 12px; line-height: 1.4; }
.banner-award-inline strong, .banner-award-inline b { color: #fff; font-size: 20px; line-height: 1.2; font-weight: 500; letter-spacing: -.025em; }
.banner-research { background: #e5eee7; color: var(--ink); border-radius: 4px; padding: 16px 24px; position: relative; align-self: stretch; animation: ftc-content-in .25s var(--move) both; }
.research-head { display: flex; justify-content: space-between; align-items: center; gap: 16px; color: #537167; font-size: 12px; letter-spacing: .08em; }
.research-head img { width: 32px; height: 24px; object-fit: contain; }
.research-head .icon { width: 20px; height: 20px; color: var(--teal); }
.research-title { margin: 8px 0 12px; font-size: 20px; font-weight: 500; line-height: 1.4; letter-spacing: -.025em; }
.research-specs { display: grid; grid-template-columns: 1fr; gap: 0; }
.research-specs > div { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding: 4px 0; border-top: 1px solid #c7d8ce; }
.research-specs span { color: #536c63; font-size: 12px; }
.research-specs b { font-size: 20px; line-height: 1.2; font-weight: 500; text-align: right; }
.research-foot { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 8px; color: #587269; font-size: 12px; }
.research-foot .icon-btn { width: 32px; height: 32px; min-height: 32px; padding: 8px; border: 1px solid #aec9ba; border-radius: 4px; background: transparent; }
.research-foot .icon-btn:hover { background: #cfe2d6; }
.banner-controls { bottom: 16px; left: 32px; right: auto; gap: 12px; color: #b7cdcf; }
.banner-controls .icon-btn { border-color: #4a666d; height: 32px; width: 32px; min-height: 32px; border-radius: 4px; background: transparent; }
.banner-controls .icon-btn:hover { background: #2a4c55; color: white; border-color: #9ebfb5; }
.banner-tabs { background: white; }
.banner-tab { padding: 12px 24px; font-size: 12px; min-width: 0; gap: 12px; min-height: 48px; }
.banner-tab.active { background: #e5eee7; color: var(--teal-dark); }
.banner-tab:hover { background: #f0f5f1; }
.banner-index { color: #738a7f; }
.banner-tab-name { min-width: 0; }
.banner-tab-status { color: var(--muted); }

/* Three concise academic participation routes, rather than invented institutional partners. */
.academic-paths { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-top: 12px; }
.academic-paths > a, .academic-paths > button { display: grid; grid-template-columns: 1fr auto; align-items: center; column-gap: 16px; row-gap: 4px; text-align: left; border: 1px solid var(--line); background: transparent; padding: 12px 16px; border-radius: 6px; color: var(--ink); }
.academic-paths small, .academic-paths label, .academic-paths span { font-size: 12px; color: var(--muted); grid-column: 1; }
.academic-paths strong { display: block; font-size: 14px; font-weight: 600; grid-column: 1; }
.academic-paths .icon { grid-column: 2; grid-row: 1 / 3; width: 20px; height: 20px; }
.academic-paths > a:hover, .academic-paths > button:hover { background: white; border-color: #92b5a5; transform: translateY(-2px); }

/* Search and competition entries share the precision of the rules they describe. */
.home-events { padding: 24px 0; }
.home-events .section-head { margin-bottom: 12px; }
.home-events .section-head h2 { font-size: 24px; font-weight: 500; }
.segmented { border-radius: 6px; background: #e7ebe5; }
.segmented button.active { box-shadow: none; }
.finder, .home-events .finder { border-radius: 8px; background: white; padding: 12px; margin-bottom: 12px; }
.home-events .categories { margin-top: 8px; }
.home-events .categories .chip { padding: 4px 12px; min-height: 28px; }
.search input { background: #fafbf8; border-color: var(--line); border-radius: 6px; }
.filter-select { border-color: var(--line); border-radius: 6px; }
.chip { border-radius: 4px; }
.chip.active { background: var(--pale); border-color: #b3d0c1; color: var(--teal-dark); }
.chip:hover { background: #f0f4ef; }
.results-grid { gap: 24px; }
.event-card { border-radius: 8px; transition: border-color .25s var(--move), transform .25s var(--move); }
.event-card:hover { border-color: #8eafa0; transform: translateY(-2px); }
.event-cover, .home-events .event-cover { height: 96px; padding: 16px 24px; background: #e1ebe3; color: var(--ink); }
.cover-symbol { position: absolute; height: 112px; width: 112px; top: 8px; right: 16px; object-fit: contain; opacity: .075; pointer-events: none; }
.event-cover .cover-meta { color: #56736a; }
.event-cover .cover-title { font-size: 20px; font-weight: 500; letter-spacing: -.025em; }
.cover-lines { display: none; }
.event-cover.team { background: #d8e5dd; }
.event-cover.ea { background: #e1e9ed; }
.event-cover.beginner { background: #eceee5; }
.event-cover.risk { background: #deebe5; }
.event-body, .home-events .event-body { padding: 16px 24px 24px; }
.event-body h3 { font-size: 20px; font-weight: 600; }
.event-body h3 a:hover { color: var(--teal-dark); }
.badge { background: #eef3ee; color: #526d5e; }
.badge.live { background: #e0f0e8; color: var(--teal-dark); }
.badge.finished { background: #eceeea; color: #6c7873; }
.save-btn.active { color: var(--teal); }
.event-stats strong { font-weight: 500; }
.card-research { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; padding: 12px 0; margin-bottom: 12px; border-top: 1px solid #e3eae4; border-bottom: 1px solid #e3eae4; }
.card-research > div, .card-research > span { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.card-research span { font-size: 12px; color: var(--muted); }
.card-research b { font-size: 14px; font-weight: 500; }
.event-bottom, .card-footer { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.event-bottom .compare-check { margin-right: auto; }
.event-bottom .text-link { font-size: 12px; }
[data-action="quickview"] { background: transparent; color: var(--teal-dark); border: 1px solid #bcd0c6; border-radius: 4px; min-height: 32px; padding: 4px 8px; font-size: 12px; }
[data-action="quickview"]:hover { background: var(--pale); border-color: var(--teal); }
.empty { border-color: #b6cbc0; border-radius: 8px; background: #fbfcf8; }
.source-section { background: #e9ede5; padding: 40px 0; }
.source-card { border-radius: 6px; background: #f8f9f5; }
.source-status { color: #536a60; }

/* Detail, rules, calendars, and standings keep the same visual vocabulary. */
.page-head { padding: 40px 0 32px; }
.page-head h1 { font-weight: 500; letter-spacing: -.03em; }
.detail-monogram { background: var(--pale); border: 1px solid var(--line); border-radius: 8px; }
.panel { border-radius: 8px; }
.panel h2 { font-weight: 500; }
.notice { background: #eef3ed; border-color: #ccdcd1; color: #466554; border-radius: 6px; }
.rule-list li { border-color: #e5ece5; }
.rule-list .icon { color: var(--teal); }
.tab-row { border-color: var(--line); }
.tab-row button.active { color: var(--teal-dark); border-bottom-color: var(--teal); }
.entry-panel { top: 24px; }
.timeline > div { border-color: #bbd1c4; }
.timeline > div:before { background: var(--teal); }
.positive { color: var(--teal-dark); }
.negative { color: var(--red); }
.avatar { background: #e5eee7; }
.ranking-table td { border-color: #e3eae4; }
.ranking-table tbody tr:hover { background: #f4f8f4; }
.ranking-table .num { font-variant-numeric: tabular-nums; }
.calendar-grid { border-radius: 8px; }
.calendar-day { border-color: #e3e9e2; }
.calendar-day.other { background: #f0f2eb; color: #7b8b80; }
.cal-event { background: #dfeee4; color: #2f6552; }
.cal-event:hover { background: #c9e2d3; }
.cal-event.end { background: #eceeea; color: #61706b; }
.workspace-row { border-radius: 8px; }
.field input, .field select, .field textarea { border-radius: 6px; border-color: #c4d3c9; }
.check-label input, .checklist input, .compare-check input, .result-line input { accent-color: var(--teal); }
.guide-footer { border-radius: 8px; }
.compare-tray { background: var(--ink); border-radius: 8px; box-shadow: 0 8px 24px #102d3a1f; }
.compare-tray .btn.primary { background: #d8eae2; border-color: #d8eae2; color: var(--ink); }
.compare-tray .icon-btn:hover { background: #2b4b55; }
.compare-table th, .compare-table td { border-color: var(--line); }
.stepper span { background: #dce6de; }
.stepper span.active { background: var(--teal); }
.success-mark { background: var(--pale); }
.success-mark .icon { color: var(--teal); }
.modal { border-radius: 8px; background: var(--paper); box-shadow: 0 24px 80px #102d3a30; }
.modal-overlay { background: #102d3a70; }
.brand-board { border-radius: 6px; }
#toast { background: var(--ink); border-radius: 6px; }

/* A focus-managed quick-view drawer and a compact keyboard command surface. */
.modal-overlay:has(.quickview-modal) { padding: 0; display: flex; align-items: stretch; justify-content: flex-end; }
.quickview-modal { width: min(560px, 100%); height: 100dvh; max-height: 100dvh; border-radius: 0; padding: 32px; box-shadow: -16px 0 64px #102d3a24; animation: ftc-drawer-in .25s var(--move) both; }
.quickview-modal .modal-head { margin-bottom: 24px; }
.quickview-modal .modal-head h2 { font-size: 24px; line-height: 1.4; letter-spacing: -.03em; }
.quickview-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; font-size: 12px; color: var(--muted); margin-bottom: 16px; }
.quickview-modal .modal-body > h3 { margin: 24px 0 12px; font-size: 16px; }
.quickview-modal .modal-body > .btn { width: 100%; margin-top: 24px; }
.quickview-grid, .quickview-facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 24px; margin: 24px 0; padding: 24px; border: 1px solid var(--line); background: white; border-radius: 6px; }
.quickview-grid > div, .quickview-facts > div { min-width: 0; }
.quickview-grid small, .quickview-facts small, .quickview-facts dt { display: block; font-size: 12px; color: var(--muted); margin-bottom: 8px; }
.quickview-grid b, .quickview-facts b, .quickview-facts dd { display: block; margin: 0; font-size: 18px; font-weight: 500; overflow-wrap: anywhere; }
.quickview-actions { display: flex; gap: 12px; margin-top: 24px; }
.quickview-actions .btn { flex: 1; }
.command-modal { width: min(620px, 100%); padding: 24px; }
.command-input { display: flex; gap: 12px; align-items: center; padding: 12px 16px; border: 1px solid #a4c0b2; background: white; border-radius: 6px; margin-bottom: 16px; }
.command-input input { width: 100%; border: 0; min-height: 32px; background: transparent; color: var(--ink); outline-offset: 6px; font-size: 16px; }
.command-input .icon { color: var(--teal); }
.command-results { display: flex; flex-direction: column; gap: 4px; max-height: 50dvh; overflow: auto; }
.command-results a, .command-results button { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px; border: 1px solid transparent; border-radius: 6px; background: transparent; text-align: left; }
.command-results a:hover, .command-results button:hover, .command-results a:focus-visible { background: #e7f1e9; border-color: #b8d1c3; }
.command-results strong { display: block; font-size: 14px; font-weight: 600; }
.command-results small { display: block; color: var(--muted); margin-top: 4px; }
.command-results a > div { min-width: 0; flex: 1; }
.command-results a > div > span { display: block; font-size: 12px; color: var(--muted); margin-top: 4px; }
.command-results > p { padding: 24px 16px; color: var(--muted); }
.command-hint { display: flex; gap: 16px; flex-wrap: wrap; color: var(--muted); font-size: 12px; margin-top: 16px; }
.command-hint kbd { font: inherit; padding: 0 4px; background: white; border: 1px solid var(--line); border-radius: 4px; }

.site-footer { background: var(--ink); color: #e8f0ec; margin-top: 32px; padding: 40px 0 32px; }
.footer-brand img { filter: brightness(0) invert(1); }
.footer-brand p { color: #b2c4c5; }
.footer-links { color: #d6e2df; }
.footer-links a:hover, .footer-links button:hover { color: #fff; background: transparent; }
.footer-bottom { border-color: #38505a; color: #adbec1; }

@keyframes ftc-content-in { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: translateY(0); } }
@keyframes ftc-drawer-in { from { opacity: 0; transform: translateX(24px); } to { opacity: 1; transform: translateX(0); } }
@media (min-width: 1550px) {
  .wrap { width: min(1360px, calc(100% - 128px)); }
  .competition-banner { padding: 40px 48px; }
  .banner-copy h2 { font-size: 48px; }
  .banner-controls { bottom: 24px; left: 48px; right: auto; }
}
@media (max-width: 1150px) {
  .wrap { width: calc(100% - 48px); }
  .topbar { gap: 16px; }
  .brand img { width: 176px; }
  .main-nav { gap: 16px; }
  .nav-search-btn kbd, .nav-search-btn > span { display: none; }
  .nav-search-btn { padding: 8px; border-color: transparent; }
  .competition-banner { padding: 24px 32px; gap: 32px; grid-template-columns: minmax(0, 1.25fr) minmax(260px, 1fr); }
  .banner-copy h2 { font-size: 30px; }
  .banner-controls { bottom: 16px; left: 32px; right: auto; }
  .banner-meta { font-size: 12px; }
  .banner-tab { padding: 16px; }
  .banner-tab-status { display: none; }
  .academic-paths > a, .academic-paths > button { padding: 12px 16px; }
  .event-body, .home-events .event-body { padding: 16px; }
  .event-bottom { gap: 8px; }
  .event-bottom .compare-check { flex-basis: 100%; }
  .event-bottom .text-link { margin-left: auto; }
}
@media (max-width: 850px) {
  .topbar { height: 72px; }
  .mobile-menu.open { background: var(--paper); }
  .platform-heading { align-items: flex-end; }
  .platform-title h1 { font-size: 30px; }
  .academic-kicker { display: none; }
  .platform-shortcuts { gap: 16px; }
  .competition-banner { gap: 24px; padding: 24px; grid-template-columns: minmax(0, 1fr) minmax(220px, .85fr); }
  .banner-copy h2 { font-size: 30px; }
  .banner-meta { flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
  .banner-lower { flex-wrap: wrap; gap: 16px; }
  .banner-research { padding: 16px; }
  .research-title { font-size: 18px; }
  .research-specs b { font-size: 18px; }
  .banner-controls { bottom: 16px; left: 24px; right: auto; }
  .academic-paths { gap: 12px; }
  .academic-paths > a, .academic-paths > button { padding: 12px; }
  .academic-paths strong { font-size: 14px; }
  .academic-paths .icon { width: 16px; height: 16px; }
}
@media (max-width: 700px) {
  .wrap { width: calc(100% - 32px); }
  .platform-heading { padding: 24px 0 16px; gap: 16px; align-items: flex-start; }
  .platform-title h1 { font-size: 30px; }
  .platform-title > span, .platform-title > p { font-size: 12px; }
  .academic-kicker { font-size: 12px; letter-spacing: .08em; }
  .platform-shortcuts { padding-top: 8px; font-size: 12px; }
  .competition-banner { grid-template-columns: minmax(0, 1fr); padding: 24px; gap: 16px; min-height: 0; }
  .banner-copy { padding-bottom: 0; }
  .banner-copy h2 { font-size: 30px; }
  .banner-copy > p { font-size: 14px; margin-top: 12px; }
  .banner-facts { margin: 16px 0 24px; }
  .banner-lower { flex-wrap: nowrap; justify-content: space-between; gap: 16px; }
  .banner-award-inline strong, .banner-award-inline b { font-size: 18px; }
  .banner-research { padding: 16px; }
  .research-specs { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
  .research-specs > div { display: block; padding-top: 12px; }
  .research-specs span { display: block; font-size: 12px; }
  .research-specs b { display: block; margin-top: 4px; font-size: 18px; text-align: left; }
  .research-foot { margin-top: 12px; padding-right: 0; }
  .banner-controls { position: static; justify-self: end; gap: 8px; }
  .banner-controls .icon-btn { width: 32px; height: 32px; min-height: 32px; }
  .banner-tab { min-height: 48px; padding: 12px 8px; gap: 4px; }
  .banner-tab-name { white-space: normal; overflow: visible; text-overflow: clip; line-height: 1.5; }
  .banner-index { display: none; }
  .academic-paths { gap: 8px; margin-top: 12px; }
  .academic-paths > a, .academic-paths > button { display: block; padding: 12px 8px; }
  .academic-paths small, .academic-paths label, .academic-paths span { font-size: 12px; line-height: 1.5; display: block; }
  .academic-paths strong { margin-top: 4px; font-size: 12px; }
  .academic-paths .icon { display: none; }
  .home-events { padding: 24px 0; }
  .home-events .section-head h2 { font-size: 20px; }
  .home-events .finder { padding: 12px; }
  .home-events .event-cover { padding: 16px 24px; }
  .home-events .event-body { padding: 16px 24px 24px; }
  .event-bottom .compare-check { flex-basis: auto; }
  .event-bottom .text-link { margin-left: 0; }
  .quickview-modal { padding: 24px 16px; }
  .quickview-grid, .quickview-facts { padding: 16px; gap: 16px; }
  .quickview-actions { flex-wrap: wrap; }
  .quickview-actions .btn { min-width: 140px; }
  .command-modal { padding: 24px 16px; }
  .command-results a, .command-results button { padding: 12px; }
  .footer-top { gap: 24px; }
  .site-footer { margin-top: 24px; }
}
@media (max-width: 600px) {
  .topbar { height: 64px; }
  .brand img { width: 144px; height: 40px; }
  .nav-tools > .btn { background: transparent; border-color: transparent; color: var(--ink); }
  .nav-tools { gap: 0; }
  .nav-search-btn { padding: 8px; min-width: 32px; }
  .nav-tools .lang-btn { padding: 8px; }
  .platform-shortcuts a { font-size: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .banner-copy, .banner-research, .quickview-modal { animation: none; }
  .event-card:hover, .academic-paths > a:hover, .academic-paths > button:hover, .text-link:hover > .icon { transform: none; }
}
