:root {
  color-scheme: light;
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #172033;
  background: #f4f6fb;
}

* { box-sizing: border-box; }

body { margin: 0; min-height: 100vh; }

a { color: #1648c8; }

a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, [tabindex]:focus-visible {
  outline: 3px solid #ffb000;
  outline-offset: 3px;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 10;
  padding: .75rem 1rem;
  background: #fff;
}

.skip-link:focus { top: 1rem; }

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  padding: 1rem clamp(1rem, 4vw, 4rem);
  background: #10244d;
  color: #fff;
  min-height: 5rem;
}

.brand { color: #fff; font-size: 1.25rem; font-weight: 800; text-decoration: none; }

nav { display: flex; gap: 1.25rem; align-items: center; min-height: 3rem; flex-wrap: nowrap; }
nav > * { display: inline-flex; align-items: center; min-height: 2.75rem; white-space: nowrap; }
nav a { color: #fff; }
nav span { color: #aebbd5; }
.site-header > nav { min-width: 0; max-width: 100%; }
.site-header > nav > a { flex-shrink: 0; }
.site-header > nav > .user-menu { min-width: 0; max-width: 100%; }
.nav-logout { margin: 0; }
.nav-logout input { display: none; }
.nav-logout button { min-height: 2.75rem; padding: .25rem .75rem; border-color: #aebbd5; background: transparent; color: #fff; font-size: .875rem; }
.user-menu { position: relative; min-height: 0; }
.user-menu > summary { min-height: 2.75rem; padding: .55rem .8rem; border: 1px solid #7283a6; border-radius: .65rem; color: #fff; cursor: pointer; font-weight: 750; list-style: none; white-space: normal; overflow-wrap: anywhere; }
.user-menu > summary::-webkit-details-marker { display: none; }
.user-menu > summary::after { content: "⌄"; margin-left: .55rem; color: #aebbd5; }
.user-menu[open] > summary::after { content: "⌃"; }
.user-menu-panel { position: absolute; z-index: 40; top: calc(100% + .5rem); right: 0; display: grid; width: min(22rem, calc(100vw - 2rem)); gap: .55rem; padding: .85rem; border: 1px solid #c8d5cf; border-radius: .85rem; background: #fff; color: #172033; box-shadow: 0 1rem 2.5rem rgb(16 35 28 / 20%); }
.user-menu-panel a { min-height: 2.5rem; padding: .55rem .7rem; border-radius: .55rem; color: #146b4b; font-weight: 750; text-decoration: none; }
.user-menu-panel a:hover { background: #e5f2eb; }
.user-menu-context { margin: 0; color: #5c667a; font-size: .82rem; }
.user-menu .admin-account-help { border-top: 1px solid #d8e8e0; padding-top: .65rem; }
.user-menu .admin-account-help > summary { color: #172033; cursor: pointer; font-weight: 750; }
.user-menu .admin-account-help p { margin: .5rem 0 0; color: #5c667a; font-size: .8rem; line-height: 1.5; white-space: normal; }
.user-menu .nav-logout button { width: 100%; border-color: #b8c9c1; color: #172033; text-align: left; }

main { width: min(72rem, calc(100% - 2rem)); margin: 3rem auto; }

.hero {
  padding: clamp(1.5rem, 5vw, 4rem);
  border-radius: 1.5rem;
  color: #fff;
  background: linear-gradient(135deg, #173b85, #2d70d7);
  box-shadow: 0 1.25rem 3rem rgb(16 36 77 / 18%);
}

.hero h1 { margin: .25rem 0 1rem; font-size: clamp(2rem, 5vw, 4rem); }
.hero p { max-width: 50rem; line-height: 1.7; }
.hero-summary { font-size: clamp(1rem, 2vw, 1.2rem); }
.eyebrow { font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }

.status-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
  gap: 1rem;
  margin-top: 1.5rem;
}

.status-card {
  display: block;
  padding: 1.25rem;
  border: 1px solid #dbe1ee;
  border-radius: 1rem;
  background: #fff;
  color: #172033;
  text-decoration: none;
  transition: border-color .15s ease, transform .15s ease, box-shadow .15s ease;
}
.status-card:hover { transform: translateY(-2px); border-color: #6f89bd; box-shadow: 0 .8rem 1.6rem rgb(16 36 77 / 10%); }

.status-grid h2 { margin: 0 0 .75rem; font-size: 1.15rem; }
.status { display: inline-flex; align-items: center; gap: .5rem; margin-block: .2rem; font-weight: 750; }
.status::before { content: ""; width: .75rem; height: .75rem; flex: 0 0 auto; border-radius: 50%; background: #d58a00; box-shadow: 0 0 0 .3rem #fff2cf; }
.status[data-state="ok"] { color: #087443; font-weight: 700; }
.status[data-state="ok"]::before { background: #13a363; box-shadow: 0 0 0 .3rem #ddf5e9; }
.status[data-state="error"] { color: #b42318; font-weight: 700; }
.status[data-state="error"]::before { background: #d92d20; box-shadow: 0 0 0 .3rem #fee4e2; }
.status-hint { margin-bottom: 0; color: #5c667a; font-size: .85rem; line-height: 1.5; }
.status-action { display: inline-block; margin-top: .8rem; color: #1648c8; font-weight: 750; }
.admin-account-info { margin-top: 1.25rem; border: 1px solid #dbe1ee; border-radius: 1rem; background: #fff; }
.admin-account-info summary { cursor: pointer; padding: 1rem 1.25rem; color: #172033; font-weight: 800; }
.admin-account-info > div { padding: 0 1.25rem 1.25rem; color: #5c667a; line-height: 1.65; }
.admin-account-info p { margin: .5rem 0; }

footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.5rem;
  padding: 2rem;
  color: #5c667a;
  font-size: .875rem;
}
footer > span { min-width: 0; max-width: 100%; overflow-wrap: anywhere; }

.page-heading { margin-bottom: 2rem; }
.page-heading h1 { margin: .25rem 0; font-size: clamp(2rem, 5vw, 3.5rem); }
.panel { margin: 1.25rem 0; padding: 1.5rem; border: 1px solid #dbe1ee; border-radius: 1rem; background: #fff; }
.stack { display: grid; gap: 1rem; }
.stack label { display: grid; gap: .4rem; font-weight: 700; }
input, select, button { min-height: 2.75rem; border: 1px solid #9ba8bd; border-radius: .5rem; padding: .6rem .75rem; font: inherit; }
button, .primary-action { display: inline-block; width: fit-content; border-color: #1648c8; background: #1648c8; color: #fff; font-weight: 700; text-decoration: none; padding: .75rem 1rem; border-radius: .5rem; cursor: pointer; }
.project-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); gap: 1rem; }
.project-list article { padding: 1rem; border: 1px solid #e3e7ef; border-radius: .75rem; }
.upload-site { margin-top: 1rem; padding-top: 1rem; border-top: 1px solid #e3e7ef; }
.gitea-source, .release-panel { margin-top: 1rem; padding-top: 1rem; border-top: 1px solid #e3e7ef; }
.project-list { grid-template-columns: repeat(auto-fit, minmax(22rem, 1fr)); }
.release-list { display: grid; gap: .75rem; padding-left: 1.25rem; }
.release-list li { padding: .75rem; border: 1px solid #e3e7ef; border-radius: .5rem; }
.actions { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .75rem; }
.actions button { min-height: 2.25rem; padding: .4rem .65rem; font-size: .875rem; }
button:disabled { cursor: not-allowed; opacity: .5; }
.inline { display: flex !important; grid-template-columns: auto 1fr; align-items: center; }
.inline input { min-height: auto; }
.secret-result { overflow-wrap: anywhere; }

@media (max-width: 42rem) {
  .site-header { align-items: flex-start; flex-direction: column; gap: .75rem; padding-inline: 1rem; }
  nav { gap: .5rem; overflow-x: auto; }
  .site-header > nav { gap: .5rem; flex-wrap: wrap; overflow: visible; }
  .site-header > nav > .user-menu { display: block; flex-basis: 100%; }
  .site-header .user-menu-panel { position: static; width: 100%; margin-top: .5rem; max-height: calc(100dvh - 6rem); overflow: auto; white-space: normal; overflow-wrap: anywhere; }
  nav span { display: none; }
}
/* Everlit 本机登录页：身份由后端验证，页面不暴露底层代码仓库界面。 */
.login-page { min-height: 100vh; background: #eef7f2; color: #10231c; }
.login-header { display: flex; justify-content: space-between; align-items: center; padding: 1.1rem clamp(1rem, 5vw, 4rem); border-bottom: 1px solid #c7ddd2; background: #fff; color: #45685a; }
.login-header .brand { color: #146b4b; }
.login-main { display: grid; align-items: center; width: min(100% - 2rem, 76rem); min-height: calc(100vh - 11rem); margin-inline: auto; padding-block: clamp(2rem, 8vw, 6rem); }
.login-shell { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(20rem, .85fr); overflow: hidden; border: 1px solid #b8d3c5; border-radius: 1.5rem; background: #fff; box-shadow: 0 1.5rem 4rem rgb(16 35 28 / 10%); }
.login-intro { padding: clamp(2rem, 6vw, 5rem); background: #e2f2ea; }
.login-intro h1 { max-width: 13ch; margin-block: .5rem 1rem; font-size: clamp(2rem, 5vw, 4.5rem); line-height: 1.05; }
.login-intro p { max-width: 34rem; color: #45685a; font-size: 1.05rem; line-height: 1.7; }
.login-form { display: grid; align-content: center; gap: .7rem; padding: clamp(2rem, 5vw, 4rem); }
.login-form label { margin-top: .45rem; color: #45685a; font-weight: 800; }
.login-form input { min-height: 3.25rem; padding: .7rem .9rem; border: 1px solid #9ebfaf; border-radius: .8rem; background: #fff; color: #10231c; font: inherit; }
.login-form input:focus-visible { outline: 3px solid #16724e; outline-offset: 3px; box-shadow: 0 0 0 6px #e5f2eb; }
.login-form button { min-height: 3.25rem; margin-top: .7rem; border-color: #16724e; background: #16724e; color: #fff; font-weight: 850; }
.login-help { color: #5a756a; font-size: .9rem; line-height: 1.5; }
.login-registration { margin-top: .25rem; border-top: 1px solid #d8e8e0; padding-top: .75rem; color: #45685a; font-size: .9rem; line-height: 1.55; }
.professional-entry { border-top: 1px solid #d8e8e0; padding-top: .75rem; color: #45685a; }
.professional-entry > summary { cursor: pointer; font-weight: 750; }
.professional-entry p { margin: .65rem 0 .45rem; font-size: .86rem; line-height: 1.5; }
.professional-entry a { color: #146b4b; font-weight: 750; }
.login-error { padding: .8rem 1rem; border-left: 4px solid #a7443e; background: #fff0ef; color: #7a2520; font-weight: 750; }
@media (max-width: 46rem) { .login-shell { grid-template-columns: 1fr; } .login-main { align-items: start; } .login-intro h1 { max-width: none; } }
