/* =====================================================================
   Classic GIDhub (Forgejo) in NIDI·OS Civic  (the owner's choice, 2026-10-01)
   =====================================================================
   Loaded by templates/custom/header.tmpl; both are bind-mounted from this
   repo into Forgejo's custom directory, so the look is versioned with the
   product. WHY CSS AND NOT A TEMPLATE FORK: forking Forgejo's templates means
   re-merging them at every upgrade; redefining its custom properties does not.

   Civic: plain Noto type (every Indian script, served from GIDhub itself -
   no third-party font requests), white paper, lines not shadows, small
   corners, one colour for the platform (teal). Light, and Dark when the
   person's theme (or their computer, on "auto") is dark. The same design
   language as GID Studio and the course site in the studio; since GID
   Studio's Direction C (2026-10-01) the neutrals are the studio's own:
   white and soft greys, charcoal (not navy) in the dark.
   ===================================================================== */

@font-face { font-family: "Noto Sans"; font-weight: 400; font-display: swap; src: url("/assets/fonts/noto-sans-400-normal-latin.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Noto Sans"; font-weight: 400; font-display: swap; src: url("/assets/fonts/noto-sans-400-normal-latin-ext.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Noto Sans"; font-weight: 400; font-display: swap; src: url("/assets/fonts/noto-sans-400-normal-devanagari.woff2") format("woff2"); unicode-range: U+0900-097F, U+1CD0-1CF9, U+200C-200D, U+20A8, U+20B9, U+20F0, U+25CC, U+A830-A839, U+A8E0-A8FF, U+11B00-11B09; }
@font-face { font-family: "Noto Sans"; font-weight: 600; font-display: swap; src: url("/assets/fonts/noto-sans-600-normal-latin.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Noto Sans"; font-weight: 600; font-display: swap; src: url("/assets/fonts/noto-sans-600-normal-latin-ext.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Noto Sans"; font-weight: 600; font-display: swap; src: url("/assets/fonts/noto-sans-600-normal-devanagari.woff2") format("woff2"); unicode-range: U+0900-097F, U+1CD0-1CF9, U+200C-200D, U+20A8, U+20B9, U+20F0, U+25CC, U+A830-A839, U+A8E0-A8FF, U+11B00-11B09; }
@font-face { font-family: "Noto Sans"; font-weight: 700; font-display: swap; src: url("/assets/fonts/noto-sans-700-normal-latin.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Noto Sans"; font-weight: 700; font-display: swap; src: url("/assets/fonts/noto-sans-700-normal-latin-ext.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Noto Sans"; font-weight: 700; font-display: swap; src: url("/assets/fonts/noto-sans-700-normal-devanagari.woff2") format("woff2"); unicode-range: U+0900-097F, U+1CD0-1CF9, U+200C-200D, U+20A8, U+20B9, U+20F0, U+25CC, U+A830-A839, U+A8E0-A8FF, U+11B00-11B09; }
@font-face { font-family: "Noto Sans Mono"; font-weight: 400; font-display: swap; src: url("/assets/fonts/noto-sans-mono-400-normal-latin.woff2") format("woff2"); }
@font-face { font-family: "Noto Sans Mono"; font-weight: 500; font-display: swap; src: url("/assets/fonts/noto-sans-mono-500-normal-latin.woff2") format("woff2"); }

/* ---- light: Forgejo's light theme, and "auto" when the computer is light */
:root {
  --color-primary:            #00695C;
  --color-primary-contrast:   #FFFFFF;
  --color-primary-dark-1:     #005E53;
  --color-primary-dark-2:     #00544A;
  --color-primary-dark-3:     #004A40;
  --color-primary-dark-4:     #003F37;
  --color-primary-dark-5:     #00342E;
  --color-primary-dark-6:     #002A25;
  --color-primary-dark-7:     #001F1C;
  --color-primary-light-1:    #1A786C;
  --color-primary-light-2:    #33877D;
  --color-primary-light-3:    #4D968D;
  --color-primary-light-4:    #66A59D;
  --color-primary-light-5:    #80B4AE;
  --color-primary-light-6:    #99C3BE;
  --color-primary-light-7:    #B3D2CE;
  --color-primary-alpha-10:   #00695C1a;
  --color-primary-alpha-20:   #00695C33;
  --color-primary-alpha-30:   #00695C4d;
  --color-primary-alpha-40:   #00695C66;
  --color-primary-alpha-50:   #00695C80;
  --color-primary-alpha-60:   #00695C99;
  --color-primary-alpha-70:   #00695Cb3;
  --color-primary-alpha-80:   #00695Ccc;
  --color-primary-alpha-90:   #00695Ce6;
  --color-body:               #FFFFFF;
  --color-box-body:           #FFFFFF;
  --color-box-body-highlight: #F3F4F6;
  --color-box-header:         #F3F4F6;
  --color-secondary:          #E7E7EC;
  --color-secondary-dark-1:   #D0D1D8;
  --color-secondary-dark-2:   #B4B6BF;
  --color-light-border:       #E7E7EC;
  --color-input-border:       #6B7585;
  --color-text:               #1D1F24;
  --color-text-dark:          #1D1F24;
  --color-text-light:         #626873;
  --color-text-light-1:       #626873;
  --color-text-light-2:       #6B707A;
  --color-text-light-3:       #6B7585;
  --color-footer:             #F3F4F6;
  --color-nav-bg:             #FFFFFF;
  --color-nav-text:           #1D1F24;
  --color-nav-hover-bg:       #F3F4F6;
  --color-menu:               #FFFFFF;
  --color-hover:              #F3F4F6;
  --color-active:             #E0F2EF;
  --color-input-background:   #FFFFFF;
  --color-markup-code-block:  #F3F4F6;
  --color-accent:             #00695C;
  --fonts-proportional: "Noto Sans", "Noto Sans Devanagari", -apple-system, "Segoe UI", system-ui, sans-serif;
  --fonts-monospace: "Noto Sans Mono", ui-monospace, "Cascadia Mono", Consolas, monospace;
  --border-radius: 4px;
  --border-radius-medium: 6px;
}

/* ---- dark: Forgejo's dark theme, and "auto" when the computer is dark */
:root[data-theme="forgejo-dark"], :root[data-theme="gitea-dark"] {
  --color-primary:            #4FD1BF;
  --color-primary-contrast:   #062925;
  --color-primary-dark-1:     #47BCAC;
  --color-primary-dark-2:     #3FA799;
  --color-primary-dark-3:     #379286;
  --color-primary-dark-4:     #2F7D73;
  --color-primary-dark-5:     #286860;
  --color-primary-dark-6:     #20544C;
  --color-primary-dark-7:     #183F39;
  --color-primary-light-1:    #61D6C5;
  --color-primary-light-2:    #72DACC;
  --color-primary-light-3:    #84DFD2;
  --color-primary-light-4:    #95E3D9;
  --color-primary-light-5:    #A7E8DF;
  --color-primary-light-6:    #B9EDE5;
  --color-primary-light-7:    #CAF1EC;
  --color-primary-alpha-10:   #4FD1BF1a;
  --color-primary-alpha-20:   #4FD1BF33;
  --color-primary-alpha-30:   #4FD1BF4d;
  --color-primary-alpha-40:   #4FD1BF66;
  --color-primary-alpha-50:   #4FD1BF80;
  --color-primary-alpha-60:   #4FD1BF99;
  --color-primary-alpha-70:   #4FD1BFb3;
  --color-primary-alpha-80:   #4FD1BFcc;
  --color-primary-alpha-90:   #4FD1BFe6;
  --color-body:               #171717;
  --color-box-body:           #1C1C1E;
  --color-box-body-highlight: #262628;
  --color-box-header:         #262628;
  --color-secondary:          #2C2C30;
  --color-secondary-dark-1:   #3A3A40;
  --color-secondary-dark-2:   #4A4A52;
  --color-light-border:       #2C2C30;
  --color-input-border:       #5A5A63;
  --color-text:               #ECECEC;
  --color-text-dark:          #FFFFFF;
  --color-text-light:         #A1A1AA;
  --color-text-light-1:       #A1A1AA;
  --color-text-light-2:       #8F8F99;
  --color-text-light-3:       #7C7C86;
  --color-footer:             #171717;
  --color-nav-bg:             #1C1C1E;
  --color-nav-text:           #ECECEC;
  --color-nav-hover-bg:       #262628;
  --color-menu:               #1C1C1E;
  --color-hover:              #262628;
  --color-active:             #12302C;
  --color-input-background:   #171717;
  --color-markup-code-block:  #262628;
  --color-accent:             #4FD1BF;
}
@media (prefers-color-scheme: dark) {
  :root[data-theme="forgejo-auto"], :root[data-theme="gitea-auto"] {
  --color-primary:            #4FD1BF;
  --color-primary-contrast:   #062925;
  --color-primary-dark-1:     #47BCAC;
  --color-primary-dark-2:     #3FA799;
  --color-primary-dark-3:     #379286;
  --color-primary-dark-4:     #2F7D73;
  --color-primary-dark-5:     #286860;
  --color-primary-dark-6:     #20544C;
  --color-primary-dark-7:     #183F39;
  --color-primary-light-1:    #61D6C5;
  --color-primary-light-2:    #72DACC;
  --color-primary-light-3:    #84DFD2;
  --color-primary-light-4:    #95E3D9;
  --color-primary-light-5:    #A7E8DF;
  --color-primary-light-6:    #B9EDE5;
  --color-primary-light-7:    #CAF1EC;
  --color-primary-alpha-10:   #4FD1BF1a;
  --color-primary-alpha-20:   #4FD1BF33;
  --color-primary-alpha-30:   #4FD1BF4d;
  --color-primary-alpha-40:   #4FD1BF66;
  --color-primary-alpha-50:   #4FD1BF80;
  --color-primary-alpha-60:   #4FD1BF99;
  --color-primary-alpha-70:   #4FD1BFb3;
  --color-primary-alpha-80:   #4FD1BFcc;
  --color-primary-alpha-90:   #4FD1BFe6;
  --color-body:               #171717;
  --color-box-body:           #1C1C1E;
  --color-box-body-highlight: #262628;
  --color-box-header:         #262628;
  --color-secondary:          #2C2C30;
  --color-secondary-dark-1:   #3A3A40;
  --color-secondary-dark-2:   #4A4A52;
  --color-light-border:       #2C2C30;
  --color-input-border:       #5A5A63;
  --color-text:               #ECECEC;
  --color-text-dark:          #FFFFFF;
  --color-text-light:         #A1A1AA;
  --color-text-light-1:       #A1A1AA;
  --color-text-light-2:       #8F8F99;
  --color-text-light-3:       #7C7C86;
  --color-footer:             #171717;
  --color-nav-bg:             #1C1C1E;
  --color-nav-text:           #ECECEC;
  --color-nav-hover-bg:       #262628;
  --color-menu:               #1C1C1E;
  --color-hover:              #262628;
  --color-active:             #12302C;
  --color-input-background:   #171717;
  --color-markup-code-block:  #262628;
  --color-accent:             #4FD1BF;
  }
}

/* ---- Civic's shapes: lines, not shadows; a quiet header; visible focus */
body { font-family: var(--fonts-regular, var(--fonts-proportional)); }
#navbar { border-bottom: 1px solid var(--color-secondary); box-shadow: none; }
#navbar .item img[src*="logo"] { border-radius: 4px; }
.ui.segment, .ui.segments, .ui.card, .ui.cards > .card, .ui.menu, .ui.dropdown .menu, .ui.modal, .ui.attached.segment { box-shadow: none !important; }
.ui.button, .ui.buttons .button { border-radius: 4px; font-weight: 600; }
.ui.primary.button, .ui.primary.buttons .button { background: var(--color-primary); color: var(--color-primary-contrast); }
h1, h2, h3, .ui.header { font-weight: 700; letter-spacing: -0.01em; }
code, pre, kbd, .code-view, .file-view .lines-code, .ui.label.commit-id-short { font-family: var(--fonts-monospace); }
:focus-visible { outline: 3px solid #0B4F9C !important; outline-offset: 2px; }
:root[data-theme="forgejo-dark"] :focus-visible { outline-color: #7FB2FF !important; }
a { text-underline-offset: 3px; }

/* The visitors' welcome on the front page (UI review 2026-10-01) */
.gid-welcome { padding: 28px 16px 8px; }
.gid-welcome-in { max-width: 980px; margin: 0 auto; }
.gid-welcome h1 { margin: 0 0 6px; font-size: 28px; }
.gid-welcome p { margin: 0 0 12px; max-width: 62ch; color: var(--color-text-light); }
.gid-welcome-note { margin-left: 10px; font-size: 13px; color: var(--color-text-light-2); }
/* The welcome is injected before the top bar (the only official place there); shown under it. */
.full.height:has(> .gid-welcome) { display: flex; flex-direction: column; }
.full.height:has(> .gid-welcome) > * { order: 3; }
.full.height:has(> .gid-welcome) > #navbar { order: 1; }
.full.height:has(> .gid-welcome) > .gid-welcome { order: 2; border-bottom: 1px solid var(--color-secondary); padding-bottom: 20px; }

/* ---- The comfort profile (cognitive accessibility, phase 1, 2026-10-03)
   The person's Display settings from the course site, copied onto <html> by templates/custom/header.tmpl from the
   gid_display cookie. Forgejo sets its type in px, so text size is page zoom (every part grows together, as with the
   browser's own zoom). High contrast strengthens text and borders where GIDhub shows its light theme; in the dark theme
   it keeps the dark colours and only adds underlined links and the thick focus ring. */
:root[data-gid-access~="large"] { zoom: 1.25; }
:root[data-gid-access~="larger"] { zoom: 1.5; }
:root[data-gid-access~="easy"] :is(.markup p, .markup li, .markup blockquote, .flex-item-body, .repo-description) { line-height: 1.8; word-spacing: 0.12em; letter-spacing: 0.012em; }
:root[data-gid-access~="easy"] .markup :is(p, li) { max-width: 70ch; }
:root[data-gid-access~="easy"] .markup a { text-decoration: underline; }
:root[data-gid-access~="easy"] .markup :is(em, i) { font-style: normal; font-weight: 700; }
:root[data-gid-access~="calm"] *, :root[data-gid-access~="calm"] *::before, :root[data-gid-access~="calm"] *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
:root[data-gid-access~="focus"] .page-footer { display: none; }
:root[data-gid-access~="focus"] .markup :is(p, li) { max-width: 65ch; }
.gid-guide { position: fixed; left: 0; right: 0; z-index: 2147483000; pointer-events: none; background: rgb(0 0 0 / 0.3); forced-color-adjust: none; }
.gid-guide--top { top: 0; }
.gid-guide--bottom { bottom: 0; }
:root[data-theme$="-dark"] .gid-guide { background: rgb(0 0 0 / 0.55); }
@media (prefers-color-scheme: dark) { :root[data-theme$="-auto"] .gid-guide { background: rgb(0 0 0 / 0.55); } }
:root[data-gid-contrast][data-theme$="-light"] {
  --color-text: #000000; --color-text-dark: #000000; --color-text-light: #1D1F24; --color-text-light-1: #1D1F24;
  --color-text-light-2: #26282E; --color-text-light-3: #33363D; --color-secondary: #6B707A; --color-light-border: #6B707A;
  --color-input-border: #4A4E57; --color-primary: #004A40; --color-primary-dark-1: #003F37;
}
@media (prefers-color-scheme: light) {
  :root[data-gid-contrast][data-theme$="-auto"] {
    --color-text: #000000; --color-text-dark: #000000; --color-text-light: #1D1F24; --color-text-light-1: #1D1F24;
    --color-text-light-2: #26282E; --color-text-light-3: #33363D; --color-secondary: #6B707A; --color-light-border: #6B707A;
    --color-input-border: #4A4E57; --color-primary: #004A40; --color-primary-dark-1: #003F37;
  }
}
:root[data-gid-contrast] .markup a, :root[data-gid-contrast] .flex-item-title a { text-decoration: underline; }
:root[data-gid-contrast] :focus-visible { outline-width: 4px !important; }
@media print { .gid-guide { display: none !important; } }
