/* Shared site shell and business pages, aligned with the Claude plan C palette. */
:root {
  --navy: #132f51;
  --blue: #17639b;
  --sky: #3085c8;
  --pale: #eaf4fb;
  --orange: #f5a43b;
  --cream: #fff6df;
  --ink: #18304c;
  --muted: #53677c;
  --line: #d6e1e9;
  --paper: #fff;
  --green: #17639b;
  --ref-blue: #17639b;
  --ref-sky: #eaf4fb;
  --ref-orange: #f5a43b;
  --ref-hover: #ee9828;
  --radius: 14px;
  --shadow: 0 10px 30px rgb(19 47 81 / 7%);
}
body {
  background: var(--paper);
  color: var(--ink);
  font: 15px/1.7 'DM Sans', 'PingFang SC', 'Microsoft YaHei', sans-serif;
}
h1, h2, h3, h4 {
  font-family: Manrope, 'PingFang SC', 'Microsoft YaHei', sans-serif;
  font-weight: 800;
}
.container { width: min(1180px, calc(100% - 64px)); }
::selection { background: #ffe9bd; color: var(--navy); }
:focus-visible { outline: 3px solid var(--sky); outline-offset: 4px; }
input, select, textarea { border-color: #b7c9d8; color: var(--ink); }
input::placeholder, textarea::placeholder { color: #60768b; }
input[type="checkbox"], input[type="radio"] { accent-color: var(--blue); }

/* The same header serves the homepage and every application route. */
#header,
body.is-home #header,
body.is-home #header.is-scrolled {
  position: sticky;
  top: 0;
  z-index: 30;
  background: #fff;
  border-bottom: 1px solid var(--line);
  box-shadow: none;
}
#header .nav-inner {
  min-height: 92px;
  height: auto;
  display: flex;
  align-items: center;
  gap: 24px;
}
#header .brand { gap: 16px; color: var(--navy); }
#header .brand img,
body.is-home #header.is-scrolled .brand img {
  display: block;
  width: 134px;
  height: 62px;
  padding: 0;
  border-radius: 0;
  object-fit: contain;
  background: transparent;
}
#header .brand-text {
  display: flex;
  padding-left: 16px;
  border-left: 1px solid var(--line);
  color: var(--navy);
  font-size: 18px;
  font-weight: 800;
  line-height: 1.4;
}
#header .brand-text small {
  display: block;
  font: 700 9px/1.6 Manrope, sans-serif;
  letter-spacing: .08em;
}
#header .main-nav {
  display: flex;
  align-items: center;
  gap: 24px;
  margin-left: auto;
}
#header .main-nav > a,
#header .nav-group > summary,
body.is-home #header.is-scrolled .main-nav > a,
body.is-home #header.is-scrolled .nav-group > summary {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 48px;
  padding: 10px 0;
  color: var(--navy);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.4;
  text-decoration: none;
  white-space: nowrap;
  border-bottom: 2px solid transparent;
}
#header .main-nav > a::after { display: none; }
#header .main-nav > a.active,
#header .nav-group.is-current > summary,
body.is-home #header.is-scrolled .main-nav > a.active,
body.is-home #header.is-scrolled .nav-group.is-current > summary {
  color: var(--blue);
  border-bottom-color: var(--blue);
}
#header .nav-group { position: relative; }
#header .nav-group > summary { cursor: pointer; list-style: none; }
#header .nav-group > summary::-webkit-details-marker { display: none; }
#header .nav-group > summary svg { width: 13px; height: 13px; }
#header .nav-dropdown {
  position: absolute;
  top: 100%;
  left: -18px;
  z-index: 35;
  min-width: 240px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  box-shadow: var(--shadow);
}
#header .nav-dropdown a { color: var(--navy); }
#header .nav-dropdown a:hover,
#header .nav-dropdown a[aria-current="page"] {
  background: #eaf4fb;
  color: var(--blue);
}
#header .nav-plan {
  margin-left: 0;
  min-height: 48px;
  gap: 8px;
  font-size: 14px !important;
  font-weight: 800;
  color: var(--navy);
  background: var(--orange) !important;
  padding: 12px 20px !important;
  border-radius: 28px;
}
#header .nav-plan:hover { background: #fbb452 !important; }
#header .nav-plan svg,
body.is-home #header.is-scrolled .nav-plan svg {
  display: block;
  width: 19px;
  height: 19px;
  color: var(--navy);
}
#header .nav-plan .count {
  display: inline-grid;
  place-items: center;
  min-width: 19px;
  height: 19px;
  margin: 0;
  padding: 0 4px;
  align-self: auto;
  background: #ffcf87 !important;
  color: var(--navy);
  font-size: 11px;
}
#header .menu-toggle,
body.is-home #header.is-scrolled .menu-toggle {
  display: none;
  color: var(--navy);
}

/* Controls retain the original blue and orange meanings throughout the tools. */
.button:not(.outline):not(.blue):not(.soft) {
  background: var(--orange);
  color: var(--navy);
  box-shadow: none;
}
.button:not(.outline):not(.blue):not(.soft):hover { background: #fbb452; }
.button.blue { background: var(--blue); color: #fff; }
.button.blue:hover { background: #124d78; }
.button.outline { background: transparent; color: var(--blue); border-color: #aabfd0; }
.button.outline:hover, .button.soft { background: #eaf4fb; color: var(--blue); }
.page-head, .detail-head { background: #eaf4fb; color: var(--ink); }
.page-head { padding: 46px 0 38px; }
.page-head h1 { font-size: clamp(30px, 3.5vw, 44px); line-height: 1.3; }
.page-head p { font-size: 15px; line-height: 1.85; }
.detail-head h1 { font-size: clamp(29px, 3.2vw, 40px); line-height: 1.35; }
.tag.open, .tag.research, .discovery-status.is-open,
.community-tags .is-free, .notice.success,
.community-message:not(.is-error) {
  background: #eaf4fb;
  color: var(--blue);
}
.tag.upcoming, .notice.warm, .community-demo { background: #fff5df; }
.tag.awaiting, .tag.closed { background: #f0f3f6; color: #53677c; }
.scholarship-card, .detail-side, .student-panel,
.community-card, .community-profile-card, .plan-card {
  border-color: var(--line);
  border-radius: 14px;
  box-shadow: none;
  background: #fff;
}
.scholarship-card:hover { border-color: #8bb7d7; }
.filter-options button[aria-pressed="true"] { background: var(--blue); color: #fff; }
.scholarship-search .filter-panel {
  background: #f5f9fc;
  padding: 22px 20px;
  border: 0;
  border-radius: 14px;
}
.filter-options button { border-color: var(--line); }
.search-active-filters, .community-cost-panel { background: #f5f9fc; }
.budget-result { background: var(--navy); color: #fff; }
.budget-result .result-block.startup { background: #21486e; }
.budget-result .notice:not(.error) { background: #21486e; color: #eef6fc; }
.budget-result .result-label, .budget-result .budget-rmb > span { color: #d7e7f5; }
.plan-aside { background: #f5f9fc; border-color: var(--line); }
.plan-aside img { object-fit: contain; }
.team-top {
  display: grid;
  grid-template-columns: minmax(0,1fr) minmax(0,1fr);
  gap: 52px;
  align-items: center;
  margin-bottom: 32px;
}
.team-top p { color: var(--muted); line-height: 1.85; }
.team-source-note {
  max-width: 74ch;
  margin: 16px auto 0;
  color: var(--muted);
  font-size: 12px;
  text-align: center;
}

/* Student and community pages keep their inputs and stateful panels in place. */
.student-center { padding-top: 0; font-size: 15px; background: #fff; }
.student-header {
  width: 100%;
  margin-bottom: 24px;
  padding: 42px max(32px, calc((100% - 1180px) / 2));
  background: #eaf4fb;
}
.student-center .student-header h1 {
  font: 800 clamp(30px, 3.5vw, 44px)/1.3 Manrope, 'PingFang SC', 'Microsoft YaHei', sans-serif;
}
.student-header p { font-size: 15px; line-height: 1.85; }
.student-tabs { background: #e1ecf5; border-radius: 10px; }
.student-tabs a[aria-current="page"] { color: var(--blue); background: #fff; }
.student-empty, .student-aside .student-panel,
.community-filter-form, .community-local-note { background: #f5f9fc; }
.student-empty img { max-width: min(100%, 220px); }
.community-tabs a[aria-current="page"] { border-color: var(--blue); color: var(--blue); }
.community-avatar, .project-mentor-monogram { color: var(--blue); background: #eaf4fb; }
.community-root input, .community-root select, .community-root textarea,
.student-center input, .student-center select, .student-center textarea { border-color: #b7c9d8; }
.community-service-choice:has(input:checked) { background: #eaf4fb; border-color: #6aafe0; }

/* Footer layout is independent of the retired landscape homepage styles. */
#footer { background: #f5f9fc; color: var(--ink); border-top: 1px solid var(--line); }
#footer .home-footer-grid {
  display: grid;
  grid-template-columns: 1.65fr repeat(4,minmax(0,1fr));
  gap: 28px;
  border: 0;
  padding: 44px 0 32px;
}
#footer .home-footer-brand .brand {
  flex-direction: column;
  align-items: flex-start;
  gap: 16px;
}
#footer .brand img { width: 140px; height: 65px; object-fit: contain; }
#footer .brand-text {
  display: flex;
  border: 0;
  padding: 0;
  font-size: 18px;
  color: var(--navy);
}
#footer .brand-text small { display: block; }
#footer .home-footer-brand p {
  max-width: 30ch;
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.8;
}
#footer .home-footer-grid h3 { margin: 4px 0 14px; font-size: 14px; }
#footer .home-footer-grid > div:not(:first-child) > a {
  display: block;
  padding: 8px 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.65;
}
#footer .home-footer-grid > div:not(:first-child) > a:hover { color: var(--blue); }
#footer .home-footer-legal {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  padding: 20px 0 26px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
  line-height: 1.8;
}
@media (max-width: 1120px) {
  #header .nav-inner { gap: 18px; }
  #header .brand { gap: 12px; }
  #header .brand img { width: 112px; height: 54px; }
  #header .brand-text { padding-left: 12px; font-size: 16px; }
  #header .main-nav { gap: 18px; }
  #header .main-nav > a, #header .nav-group > summary { font-size: 13px; }
}
@media (max-width: 1000px) {
  #header .nav-inner { min-height: 80px; gap: 14px; }
  #header .main-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    width: 100%;
    margin: 0;
    padding: 12px max(24px, calc((100% - 1180px) / 2)) 20px;
    border-bottom: 1px solid var(--line);
    background: #fff;
    box-shadow: 0 12px 20px rgb(19 47 81 / 6%);
    max-height: calc(100dvh - 80px);
    overflow-y: auto;
  }
  #header .main-nav.is-open { display: flex; align-items: stretch; flex-direction: column; gap: 2px; }
  #header .main-nav > a, #header .nav-group > summary,
  body.is-home #header.is-scrolled .main-nav > a,
  body.is-home #header.is-scrolled .nav-group > summary {
    display: flex;
    min-height: 44px;
    padding: 10px 8px;
    font-size: 15px;
  }
  #header .nav-group > summary { justify-content: space-between; }
  #header .nav-dropdown {
    position: static;
    min-width: 0;
    margin: 4px 0 8px 8px;
    padding: 4px 6px;
    border: 0;
    border-left: 2px solid #c8dfef;
    border-radius: 0;
    box-shadow: none;
  }
  #header .nav-plan { margin-left: auto; }
  #header .menu-toggle, body.is-home #header.is-scrolled .menu-toggle {
    display: inline-flex;
    width: 44px;
    height: 44px;
  }
  #footer .home-footer-grid { grid-template-columns: repeat(4,minmax(0,1fr)); }
  #footer .home-footer-brand { grid-column: 1 / -1; }
  #footer .home-footer-brand .brand { flex-direction: row; align-items: center; }
  #footer .home-footer-brand p { max-width: 64ch; }
  #footer .home-footer-legal { flex-direction: column; gap: 8px; }
}
@media (max-width: 640px) {
  .container { width: calc(100% - 32px); }
  #header .nav-inner { min-height: 76px; gap: 10px; }
  #header .brand img, body.is-home #header.is-scrolled .brand img { width: 88px; height: 46px; }
  #header .brand-text { padding-left: 10px; font-size: 15px; }
  #header .brand-text small { font-size: 8px; }
  #header .nav-plan { min-height: 42px; font-size: 13px !important; padding: 10px 14px !important; }
  #header .main-nav { max-height: calc(100dvh - 76px); }
  .page-head { padding: 30px 0; }
  .page-head p, .student-header p { font-size: 14px; }
  .student-header { display: block; padding: 30px 16px; }
  .student-header > .text-button { margin-top: 14px; }
  .team-top { grid-template-columns: 1fr; gap: 18px; margin-bottom: 24px; }
  #footer .home-footer-grid { grid-template-columns: repeat(2,minmax(0,1fr)); padding-top: 32px; gap: 24px; }
  #footer .home-footer-grid > div:not(:first-child) > a { min-height: 44px; }
}
@media (max-width: 480px) {
  #header .nav-inner { gap: 8px; }
  #header .brand { gap: 9px; }
  #header .brand img, body.is-home #header.is-scrolled .brand img { width: 74px; height: 40px; }
  #header .brand-text { font-size: 14px; padding-left: 9px; }
  #header .brand-text small { display: none; }
  #header .nav-plan { padding: 10px !important; gap: 4px; }
  #header .nav-student-label { display: none; }
  #header .nav-plan .count { min-width: 16px; height: 16px; padding: 0 3px; font-size: 10px; }
  #header .menu-toggle, body.is-home #header.is-scrolled .menu-toggle { width: 40px; height: 40px; }
  #footer .home-footer-brand .brand { gap: 14px; }
  #footer .brand img { width: 112px; height: 55px; }
  #footer .brand-text { font-size: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  #header { transition: none; }
}

