/* Homepage and password sign-in presentation; all other Gitea pages keep their styles. */
body:has(.repo-landing) {
  --repo-landing-blue: #0864f4;
  --repo-landing-ink: #0c254a;
  --repo-landing-muted: #6281a6;
  --repo-landing-split: 59.25%;
  background: linear-gradient(to right, #e5f1ff 0 var(--repo-landing-split), #fff var(--repo-landing-split) 100%);
  color: var(--repo-landing-ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}
body:has(.repo-landing) .full.height { min-height: calc(100svh - 54px); display: block; padding-bottom: 0; }
.repo-landing { display: grid; grid-template-columns: 59.25% 40.75%; min-height: calc(100svh - 54px); padding: 0; }
.repo-landing.page-content > .repo-landing-brand-panel { position: relative; overflow: hidden; display: flex; flex-direction: column; min-width: 0; padding: 44px 9% 38px; background: #e5f1ff; }
.repo-landing .repo-landing-brand { position: relative; z-index: 1; display: inline-flex; align-items: center; min-height: 44px; color: var(--repo-landing-ink); font-size: clamp(18px, 1.7vw, 30px); font-weight: 750; line-height: 1.3; }
.repo-landing .repo-landing-brand:hover { color: var(--repo-landing-blue); }
.repo-landing-story { position: relative; z-index: 1; margin-top: clamp(62px, 8vh, 106px); }
.repo-landing-story h1 { margin: 0; color: var(--repo-landing-ink); font-size: clamp(44px, 4.15vw, 82px); font-weight: 850; line-height: 1.35; letter-spacing: -.055em; }
.repo-landing-story p { margin-top: 26px; color: var(--repo-landing-muted); font-size: clamp(18px, 1.58vw, 30px); line-height: 1.9; }
.repo-landing-art { position: absolute; z-index: 0; bottom: 102px; left: 0; width: 100%; height: clamp(235px, 41vh, 480px); object-fit: cover; object-position: center 48%; pointer-events: none; }
.repo-landing-features { position: relative; z-index: 1; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; margin-top: auto; padding-top: 245px; }
.repo-landing-features > div { min-width: 0; padding-left: 22px; border-left: 1px solid #cddff6; }
.repo-landing-features > div:first-child { padding-left: 0; border-left: 0; }
.repo-landing-features strong { display: block; color: var(--repo-landing-blue); font-size: clamp(18px, 1.65vw, 28px); line-height: 1.5; }
.repo-landing-features span { display: block; margin-top: 2px; color: var(--repo-landing-muted); font-size: clamp(12px, 1.1vw, 18px); line-height: 1.6; }
.repo-landing-panel { position: relative; display: flex; flex-direction: column; justify-content: center; min-width: 0; padding: 112px clamp(40px, 7.6vw, 156px) 100px; background: #fff; }
.repo-landing-content { width: 100%; max-width: 525px; margin: 0 auto; }
.repo-landing-heading { margin-bottom: 46px; }
.repo-landing-heading h2 { margin: 0 0 14px; color: var(--repo-landing-ink); font-size: clamp(30px, 2.5vw, 48px); font-weight: 800; line-height: 1.3; letter-spacing: -.035em; }
.repo-landing-heading p { margin: 0; color: #7b92b0; font-size: clamp(15px, 1.14vw, 21px); line-height: 1.65; }
.repo-landing-footnote { position: absolute; bottom: 25px; right: 20px; left: 20px; color: #8399b5; text-align: center; font-size: 13px; line-height: 1.6; }
.repo-landing-home-summary { display: grid; gap: 24px; margin: 8px 0 42px; color: #496b91; font-size: 16px; }
.repo-landing-home-summary > div { display: flex; align-items: center; gap: 15px; line-height: 1.6; }
.repo-landing-home-summary .svg { flex-shrink: 0; color: var(--repo-landing-blue); }
.repo-landing-actions { display: grid; gap: 20px; }
.repo-landing .repo-landing-primary.ui.button, .repo-landing-form .ui.form .primary.button { display: flex; align-items: center; justify-content: center; width: 100%; min-height: 58px; margin: 0; border: 1px solid var(--repo-landing-blue); border-radius: 6px; background: var(--repo-landing-blue); color: #fff; font-size: 18px; font-weight: 700; box-shadow: none; }
.repo-landing .repo-landing-primary.ui.button:hover, .repo-landing-form .ui.form .primary.button:hover { border-color: #0754d2; background: #0754d2; color: #fff; }
.repo-landing .repo-landing-secondary.ui.button { display: flex; align-items: center; justify-content: center; width: 100%; min-height: 58px; margin: 0; border: 1px solid #b5c9e5; border-radius: 6px; background: #fff; color: var(--repo-landing-ink); font-size: 17px; font-weight: 650; box-shadow: none; }
.repo-landing .repo-landing-secondary.ui.button:hover { border-color: var(--repo-landing-blue); background: #f2f7ff; }
.repo-landing-form > .ui.top.attached.header { display: none; }
.repo-landing-form > .ui.attached.segment { width: 100%; max-width: 100%; margin: 0; padding: 0; border: 0; background: transparent; box-shadow: none; }
/* The original sign-in form uses fixed-width and spacing utilities with !important. */
.repo-landing-form .ui.form { width: 100% !important; max-width: 100% !important; margin: 0 !important; }
.repo-landing-form .ui.form .field { margin: 0 0 26px; }
.repo-landing-form .ui.form .field > label { margin-bottom: 8px; color: #203b5e; font-size: 15px; font-weight: 500; }
.repo-landing-form .ui.form input[type="text"], .repo-landing-form .ui.form input[type="password"] { min-height: 58px; padding: 14px 18px; border: 1px solid #adcdf6; border-radius: 6px; background: #dce9f7; color: var(--repo-landing-ink); font-size: 16px; line-height: 1.5; }
.repo-landing-form .ui.form input:focus { border-color: var(--repo-landing-blue); background: #edf4ff; box-shadow: 0 0 0 3px #0864f416; }
.repo-landing-form .ui.form .error.field input { border-color: #d86666; background: #fff2f2; }
.repo-landing-form .ui.form .inline.field { margin: 30px 0; }
.repo-landing-form .ui.checkbox label { color: #27466b; font-size: 15px; line-height: 1.5; }
.repo-landing-form .ui.checkbox input[type="checkbox"] { top: 4px; left: 0; width: 16px !important; height: 16px; margin: 0; accent-color: var(--repo-landing-blue); }
.repo-landing-form .repo-signin-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 14px; }
.repo-landing-form .ui.form a { color: var(--repo-landing-blue); line-height: 1.6; }
.repo-landing-form .ui.form a:hover { text-decoration: underline; }
/* Place the existing recovery link beside the password label without moving form markup. */
.repo-landing-form .ui.form:has(> .repo-password-field) { display: grid; grid-template-columns: minmax(0, 1fr); }
.repo-landing-form .ui.form:has(> .repo-password-field) > .field { grid-column: 1; }
.repo-landing-form .ui.form:has(> .repo-password-field) > .repo-password-field { grid-row: 2; }
.repo-landing-form .ui.form:has(> .repo-password-field) > .repo-password-field > label { padding-right: 110px; }
.repo-landing-form .ui.form:has(> .repo-password-field) > .repo-signin-actions { display: contents; }
.repo-landing-form .ui.form:has(> .repo-password-field) > .repo-remember-field { margin: 10px 0 30px; }
.repo-landing-form .ui.form:has(> .repo-password-field) .repo-forgot-password { grid-column: 1; grid-row: 2; align-self: start; justify-self: end; z-index: 1; font-size: 14px; }
.repo-landing-form .ui.form:has(> .repo-password-field) .repo-signin-submit { grid-column: 1; margin-bottom: 26px; }
.repo-landing-form .repo-signin-register { text-align: center; }
.repo-landing-form .repo-signin-register a { display: flex; align-items: center; justify-content: center; min-height: 54px; padding: 10px 14px; border: 1px solid #b5c9e5; border-radius: 6px; color: var(--repo-landing-ink); font-size: 15px; }
.repo-landing-form .repo-signin-register a:hover { border-color: var(--repo-landing-blue); background: #f2f7ff; text-decoration: none; }
.repo-landing-form .divider { color: #8294ac; border-color: #e2eaf4; }
.repo-landing-form #oauth2-login-navigator .ui.button { min-height: 54px; border: 1px solid #b5c9e5; border-radius: 6px; background: #fff; color: var(--repo-landing-ink); }
.repo-landing-form .ui.message { margin-bottom: 22px; border-radius: 6px; }
.repo-landing-form .ui.message.error { color: #9f3030; }
.repo-landing :is(a, button, input):focus-visible { outline: 3px solid #0864f455; outline-offset: 3px; }
body:has(.repo-landing) #navbar { position: absolute; top: 26px; left: calc(59.25% + 26px); z-index: 20; display: flex; align-items: center; justify-content: flex-start; width: calc(40.75% - 154px); min-height: 40px; padding: 0; border: 0; background: transparent; box-shadow: none; }
body:has(.repo-landing) #navbar #navbar-logo { display: none !important; }
body:has(.repo-landing) #navbar .navbar-left, body:has(.repo-landing) #navbar .navbar-right { gap: 1px; margin: 0; background: transparent; }
body:has(.repo-landing) #navbar .item { padding: 8px 9px; color: #637a98; font-size: 12px; white-space: nowrap; }
body:has(.repo-landing) #navbar .item:hover { color: var(--repo-landing-blue); background: #edf4ff; }
body:has(.repo-landing) #navbar .item .svg { width: 13px; height: 13px; }
body:has(.repo-landing) .page-footer { justify-content: center; gap: 14px; width: 40.75%; min-height: 54px; margin-left: 59.25%; padding: 14px 18px; border: 0; background: #fff; color: #8a9ab0; font-size: 10px; line-height: 1.6; }
body:has(.repo-landing) .page-footer .left-links, body:has(.repo-landing) .page-footer .right-links { gap: 8px; }
body:has(.repo-landing) .page-footer a { color: #7b91ae; }
body:has(.repo-landing) .page-footer .language { position: absolute; top: 34px; right: 28px; z-index: 30; color: #27446c; font-size: 13px; }
body:has(.repo-landing) .page-footer .language > .menu { top: 100%; bottom: auto; right: 0; left: auto; max-height: min(430px, 70svh); overflow-y: auto; margin-top: 12px; border-color: #d6e2f2; border-radius: 8px; background: #fff; }
body:has(.repo-landing) .page-footer .language > .menu .item { color: #2f4b70; }
@media (min-width: 981px) and (max-height: 760px) {
  .repo-landing.page-content > .repo-landing-brand-panel { padding-top: 34px; }
  .repo-landing-story { margin-top: 48px; }
  .repo-landing-story h1 { font-size: clamp(40px, 4vw, 70px); }
  .repo-landing-story p { margin-top: 20px; }
  .repo-landing-features { padding-top: 200px; }
  .repo-landing-art { height: 285px; bottom: 86px; }
  .repo-landing-panel { padding-top: 100px; padding-bottom: 70px; }
  .repo-landing-heading { margin-bottom: 30px; }
}
@media (max-width: 980px) {
  body:has(.repo-landing) { background: #fff; }
  body:has(.repo-landing) .full.height { min-height: 0; }
  .repo-landing { grid-template-columns: 1fr; min-height: 0; }
  .repo-landing.page-content > .repo-landing-brand-panel { min-height: 420px; padding: 70px 32px 28px; }
  .repo-landing .repo-landing-brand { min-height: 36px; max-width: calc(100% - 12px); font-size: 20px; }
  .repo-landing-story { margin-top: 34px; }
  .repo-landing-story h1 { font-size: clamp(35px, 6.5vw, 50px); }
  .repo-landing-story p { margin-top: 14px; font-size: 17px; line-height: 1.75; }
  .repo-landing-art { right: 0; bottom: 50px; left: auto; width: 57%; height: 250px; object-position: 52% center; opacity: .7; }
  .repo-landing-features { gap: 12px; margin-top: 30px; padding-top: 12px; }
  .repo-landing-features > div { padding-left: 14px; }
  .repo-landing-features strong { font-size: 17px; }
  .repo-landing-features span { font-size: 12px; }
  .repo-landing-panel { padding: 48px 32px 82px; }
  .repo-landing-content { max-width: 500px; }
  .repo-landing-heading { margin-bottom: 30px; }
  .repo-landing-heading h2 { font-size: 32px; }
  .repo-landing-heading p { font-size: 15px; }
  .repo-landing-footnote { bottom: 22px; font-size: 12px; }
  body:has(.repo-landing) #navbar { top: 15px; left: 24px; width: calc(100% - 146px); padding: 0; }
  body:has(.repo-landing) #navbar .navbar-left, body:has(.repo-landing) #navbar .navbar-right { flex-wrap: wrap; }
  body:has(.repo-landing) #navbar .item { padding: 6px 8px; }
  body:has(.repo-landing) #navbar .item:not(.active) { color: #47698d; }
  body:has(.repo-landing) .page-footer { flex-direction: column; flex-wrap: nowrap; align-items: center; flex-shrink: 0; width: 100%; margin-left: 0; padding: 12px 20px; }
  body:has(.repo-landing) .page-footer .left-links, body:has(.repo-landing) .page-footer .right-links { justify-content: center; min-width: 0; width: 100%; }
  body:has(.repo-landing) .page-footer .language { top: 24px; right: 24px; }
}
@media (max-width: 767px) {
  body:has(.repo-landing) #navbar { flex-direction: column; align-items: stretch; }
  body:has(.repo-landing) #navbar .navbar-left { align-items: flex-start; }
  body:has(.repo-landing) #navbar .navbar-mobile-right { align-self: flex-start; margin: 0 !important; padding: 0; }
  body:has(.repo-landing) #navbar.navbar-menu-open { padding: 8px; border: 1px solid #d6e2f2; border-radius: 8px; background: #fff; box-shadow: 0 8px 24px #0c254a14; }
  body:has(.repo-landing) #navbar.navbar-menu-open .navbar-left, body:has(.repo-landing) #navbar.navbar-menu-open .navbar-right { width: 100%; }
}
@media (max-width: 480px) {
  .repo-landing.page-content > .repo-landing-brand-panel { min-height: 395px; padding-right: 24px; padding-left: 24px; }
  .repo-landing .repo-landing-brand { font-size: 17px; }
  .repo-landing-story h1 { font-size: 35px; }
  .repo-landing-story p { font-size: 15px; }
  .repo-landing-art { width: 66%; height: 215px; bottom: 68px; opacity: .42; }
  .repo-landing-features { gap: 8px; }
  .repo-landing-features > div { padding-left: 9px; }
  .repo-landing-features strong { font-size: 15px; }
  .repo-landing-features span { font-size: 11px; }
  .repo-landing-panel { padding-right: 24px; padding-left: 24px; }
  .repo-landing-heading h2 { font-size: 29px; }
  .repo-landing-home-summary { gap: 20px; font-size: 14px; }
}
@media (prefers-reduced-motion: reduce) {
  .repo-landing *, body:has(.repo-landing) #navbar * { scroll-behavior: auto; transition: none; }
}
