/* Local GitHub-inspired styling for Gitea. No external assets or scripts. */
:root{--gh-canvas:#ffffff;--gh-muted:#f6f8fa;--gh-fg:#1f2328;--gh-subtle:#59636e;--gh-border:#d1d9e0;--gh-link:#0969da;--gh-green:#1f883d;--gh-green-hover:#1a7f37;--gh-hover:#eef1f4;--gh-shadow:0 1px 0 rgba(31,35,40,.04);}
html[data-theme="gitea-dark"]{--gh-canvas:#0d1117;--gh-muted:#151b23;--gh-fg:#f0f6fc;--gh-subtle:#9198a1;--gh-border:#3d444d;--gh-link:#4493f8;--gh-green:#238636;--gh-green-hover:#29903b;--gh-hover:#212830;--gh-shadow:0 1px 0 rgba(1,4,9,.1);}
@media(prefers-color-scheme:dark){html[data-theme="gitea-auto"]{--gh-canvas:#0d1117;--gh-muted:#151b23;--gh-fg:#f0f6fc;--gh-subtle:#9198a1;--gh-border:#3d444d;--gh-link:#4493f8;--gh-green:#238636;--gh-green-hover:#29903b;--gh-hover:#212830;--gh-shadow:0 1px 0 rgba(1,4,9,.1);}}

:root {
 --fonts-regular: -apple-system,BlinkMacSystemFont,"Segoe UI","Noto Sans",Helvetica,Arial,"Apple Color Emoji","Segoe UI Emoji","PingFang SC","Microsoft YaHei",sans-serif;
 --border-radius:6px; --border-radius-medium:6px; --border-radius-large:8px;
 --color-body:var(--gh-canvas); --color-box-body:var(--gh-canvas); --color-box-header:var(--gh-muted);
 --color-text:var(--gh-fg); --color-text-dark:var(--gh-fg); --color-text-light:var(--gh-subtle);
 --color-text-light-1:var(--gh-subtle); --color-text-light-2:var(--gh-subtle);
 --color-primary:var(--gh-link); --color-primary-hover:var(--gh-link);
 --color-secondary:var(--gh-border); --color-secondary-dark-1:var(--gh-border);
 --color-secondary-light-1:var(--gh-hover); --color-secondary-alpha-30:var(--gh-border);
 --color-input-text:var(--gh-fg); --color-input-background:var(--gh-canvas); --color-input-border:var(--gh-border);
 --color-menu:var(--gh-muted); --color-card:var(--gh-muted); --color-button:var(--gh-muted);
 --color-nav-bg:var(--gh-muted); --color-nav-hover-bg:var(--gh-hover); --color-nav-text:var(--gh-fg);
 --color-secondary-nav-bg:var(--gh-canvas); --color-footer:var(--gh-canvas);
}
body {font-size:14px; -webkit-font-smoothing:antialiased;}
a {text-underline-offset:3px;}
.ui.header {font-family:var(--fonts-regular);font-weight:600;}
.ui.segment,.ui.segments,.ui.attached.header,.ui.menu,.ui.table {border-color:var(--gh-border);box-shadow:none;}
.ui.segment,.ui.card {border-radius:6px;}
.ui.top.attached.header {border-radius:6px 6px 0 0;}
.ui.bottom.attached.segment {border-radius:0 0 6px 6px;}
.ui.button {font-weight:500;border-radius:6px;box-shadow:var(--gh-shadow);}
.ui.primary.button,.ui.green.button {background:var(--gh-green);color:#fff;border:1px solid rgba(27,31,36,.15);}
.ui.primary.button:hover,.ui.green.button:hover {background:var(--gh-green-hover);color:#fff;}
.ui.basic.primary.button {background:var(--gh-muted);color:var(--gh-fg);border:1px solid var(--gh-border);}
.ui.basic.primary.button:hover {background:var(--gh-hover);color:var(--gh-fg);}
.ui.form input:not([type=checkbox]):not([type=radio]),.ui.form textarea,.ui.input>input {
 border-radius:6px; min-height:34px; border-color:var(--gh-border); background:var(--gh-canvas);
}
.ui.form input:focus,.ui.form textarea:focus,.ui.input>input:focus {
 border-color:var(--gh-link);outline:2px solid var(--gh-link);outline-offset:-1px;box-shadow:none;
}
:focus-visible {outline:2px solid var(--gh-link);outline-offset:3px;}
.ui.form .field>label {font-weight:500;font-size:14px;margin-bottom:8px;}
.ui.form .field {margin-bottom:18px;}
#navbar {min-height:64px;border-bottom:1px solid var(--gh-border);padding:8px 24px;gap:8px;}
#navbar .item {border-radius:6px;font-weight:500;}
#navbar .item:hover {background:var(--gh-hover);}
#navbar .item img {filter:grayscale(1);}
.secondary-nav {border-bottom:1px solid var(--gh-border);}
.secondary-nav .active.item {border-bottom-color:#fd8c73;}
footer {border-top:1px solid var(--gh-border);color:var(--gh-subtle);font-size:12px;padding:24px 32px !important;}
/* Auth screens retain Gitea's forms, validation, passkey hooks and routes. */
.page-content.user.signin {padding:46px 20px 64px;}
.page-content.user.signin>.ui.page.grid {display:block;margin:0;padding:0;}
.page-content.user.signin>.ui.page.grid>.column {width:360px !important;max-width:100%;padding:0;}
.page-content.user.signin .ui.container.fluid {width:100% !important;max-width:100% !important;margin:0 !important;}
.page-content.user.signin h4::before {content:"Gitea";display:block;font-size:14px;font-weight:600;letter-spacing:.1px;margin-bottom:12px;}
.page-content.user.signin .ui.attached.segment.header.top {font-size:14px;line-height:1.6;gap:8px;background:var(--gh-canvas);border:1px solid var(--gh-border);padding:18px;border-radius:6px;}
.page-content.user.signin h4.ui.top.attached.header {
 border:0;background:transparent;font-size:24px;font-weight:400;line-height:1.4;padding:0 0 24px;text-align:center;
}
.page-content.user.signin form.ui.form>.ui.attached.segment,
.page-content.user.signin .ui.attached.segment {
 background:var(--gh-muted);border:1px solid var(--gh-border);border-radius:6px;padding:24px;box-shadow:none;
}
.page-content.user.signin .ui.attached.segment+.ui.attached.segment {margin-top:16px;background:var(--gh-canvas);padding:18px 24px;}
.page-content.user.signin .ui.form .field:last-child {margin-bottom:0;}
.page-content.user.signin .ui.button {min-height:34px;}
.page-content.user.signin .ui.container>.ui.grid {margin:0;}
/* OAuth approval remains distinct, with full app identity, scopes and destination. */
.oauth2-authorize-application-box {padding:56px 20px 80px;}
.oauth2-authorize-application-box>.ui.container {max-width:480px !important;width:100% !important;}
.oauth2-authorize-application-box .ui.top.attached.header {
 padding:24px;font-size:22px;line-height:1.45;background:var(--gh-muted);overflow-wrap:anywhere;
}
.oauth2-authorize-application-box .ui.attached.segment {padding:24px;line-height:1.8;overflow-wrap:anywhere;}
.oauth2-authorize-application-box .ui.attached.segment:last-child {border-radius:0 0 6px 6px;background:var(--gh-muted);}
.oauth2-authorize-application-box form {display:flex;flex-wrap:wrap;gap:12px;}
.oauth2-authorize-application-box form .ui.button {flex:1;min-width:140px;margin:0;min-height:38px;}
.oauth2-authorize-application-box #authorize-app {background:var(--gh-green);color:#fff;border:1px solid rgba(27,31,36,.15);}
.oauth2-authorize-application-box #authorize-app:hover {background:var(--gh-green-hover);}
/* Home and repository surfaces use the same compact, quiet visual system. */
.page-content.home div.hero {padding:0 0 24px;}
.page-content.home h1.hero {padding:0;margin-top:0;}
.page-content.home>.tw-mb-8 {padding-top:48px;}
.page-content.home .logo {width:88px;height:88px;filter:grayscale(1);}
.page-content.home .hero h1 {font-size:48px;font-weight:650;letter-spacing:-1.6px;margin-top:24px;}
.page-content.home .hero h2 {font-size:22px;font-weight:400;line-height:1.6;color:var(--gh-subtle);}
.page-content.home .hero .svg {color:var(--gh-fg);}
.page-content.home .ui.stackable.grid {row-gap:24px;}
.page-content.home .ui.stackable.grid .column {line-height:1.8;}
.page-content.home .ui.stackable.grid h1 {font-size:22px;font-weight:600;}
.page-content.home .ui.stackable.grid .svg {color:var(--gh-subtle);}
.repository .repo-header {background:var(--gh-muted);border-bottom:1px solid var(--gh-border);}
.repository .ui.tabs.container {margin-top:16px;}
.repository .ui.table {border-radius:6px;}
.repository .ui.table thead th {background:var(--gh-muted);}
.ui.secondary.pointing.menu .active.item {border-color:#fd8c73;}
.ui.label {border-radius:2em;font-weight:500;}
@media(max-width:767px) {
 #navbar {padding:8px 12px;min-height:56px;}
 .page-content.user.signin {padding:32px 16px 48px;}
 .page-content.user.signin .ui.attached.segment {padding:20px;}
 .oauth2-authorize-application-box {padding:32px 16px 48px;}
 .oauth2-authorize-application-box .ui.attached.segment,.oauth2-authorize-application-box .ui.top.attached.header {padding:20px;}
 .page-content.home>.tw-mb-8 {padding-top:32px;}
 .page-content.home .hero h1 {font-size:38px;}
 .page-content.home .hero h2 {font-size:18px;}
 footer {padding:20px 16px !important;}
}
@media(prefers-reduced-motion:reduce) {html {scroll-behavior:auto;}}
