﻿/* CISV’s official typeface, self-hosted for this tenant only.
   =========================================================================
   **The isolation is the whole point, and it is structural rather than something this file asks for.**
   `HeaderShellViewComponent` emits `<link ~/css/Cust/{SeqNo}/{SeqNo}.css>` only when the file exists,
   so a tenant that is not 72 never fetches this stylesheet, never parses these @font-face rules, and
   never requests a single byte of the font files. Nothing here can leak sideways.

   **The legacy shell loads this same file** (`ViewComponents/Layout/Original/HeaderViewComponent.cshtml`
   reads the same `CustomCssPath`), so these rules are parsed there too. That is harmless and downloads
   nothing: a browser fetches a webfont only when a rendered element actually uses the family, and the
   only thing that selects it is `--k-font`, which `design2026/base.css` reads and the legacy shell
   never loads. If legacy CISV should also use the font one day, that is a separate decision.

   **Which family.** `v2/kunder.js` gives CISV `font: { navn: "Source Sans 3", overskrift: "Source Sans 3" }`
   — one sans for body and headings alike. Source Sans 3 is the current release of the family CISV ships
   officially as Source Sans **Pro**; the Pro files are the ones in `AI_knowledge/Innmelding/CISV/CISV
   Official Fonts`, which is the set the organisation actually licenses, so those are what is served.
   Overpass and Source Serif Pro are in that folder too and are deliberately NOT shipped: nothing selects
   them, and an unused webfont is bytes every CISV visitor pays for and never sees.

   **Four weights of twelve.** Regular 400 and Bold 700 carry body and labels, SemiBold 600 is the
   prototype’s emphasis weight, and Italic 400 is the `fst-italic` help text under the unique e-mail and
   mobile fields. The other eight would be about 1.3 MB nothing renders.

   **Format is TTF, and it should not stay that way.** These four are ~880 KB; the same faces as WOFF2
   are roughly half that, and every browser this application supports reads WOFF2. No converter was
   available where this was written, so the conversion is a manual step — when it happens, add the
   `woff2` source BEFORE the `truetype` one in each rule and browsers take the smaller file.

   **The url() is relative and must stay relative.** It resolves against THIS stylesheet, so
   `/InnmeldingV2/css/Cust/72/72.css` finds `/InnmeldingV2/css/Cust/72/fonts/…` under a virtual
   directory and `/css/Cust/72/fonts/…` at the site root. A root-absolute `url("/…")` is correct only at
   the root and is what finding F57 was. Note the F57 hazard itself does not apply here — that was a
   url() inside a custom property, which resolves against the document; this is an ordinary at-rule.

   **Licence.** SIL Open Font License 1.1. Redistribution is permitted and requires the licence to travel
   with the files, so `fonts/OFL.txt` is served beside them and must not be deleted as “unused”. */
@font-face {
    font-family: "Source Sans Pro";
    src: url("fonts/SourceSansPro-Regular.ttf") format("truetype");
    font-weight: 400;
    font-style: normal;
    /* Text paints immediately in the fallback and reflows when the face arrives, rather than sitting
       invisible for up to three seconds on a slow connection. A registration form is not decoration. */
    font-display: swap;
}

@font-face {
    font-family: "Source Sans Pro";
    src: url("fonts/SourceSansPro-Italic.ttf") format("truetype");
    font-weight: 400;
    font-style: italic;
    font-display: swap;
}

@font-face {
    font-family: "Source Sans Pro";
    src: url("fonts/SourceSansPro-SemiBold.ttf") format("truetype");
    font-weight: 600;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "Source Sans Pro";
    src: url("fonts/SourceSansPro-Bold.ttf") format("truetype");
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}


/* Legacy keeps the blue it has always had. `body:not(.inn-body)` is what makes that safe: the legacy
   `_Layout.cshtml` has a bare `<body>`, so legacy output is unchanged and "feature-off is
   byte-identical" still holds, while `_LayoutNew.cshtml` sets `class="inn-body"` and is served by the
   token block below instead. */
body:not(.inn-body) .footer {
    background-color: rgb(0, 114, 206) !important;
    border-top: rgb(0, 114, 206) !important;
}

/* CISV's tenant profile for the new shell.
   =========================================================================
   **These values are Min side 2026's, copied from `Minside/wwwroot/css/theme/72.css` on 2026-08-21**
   so one organisation looks like one organisation across both products. That file's own source is
   `v2/kunder.js` (id "cisv") in the MinSide v2 design project.

   **This supersedes finding F31 (2026-08-20), which made this footer white in the new shell.** That
   decision came from the Innmelding prototype, where CISV has no `footer:` key and `--k-footer-bg`
   therefore stays `transparent`. The MinSide design answers the same question differently and more
   completely: a tenant without an explicit footer block gets its BRAND as the footer background and a
   4 px accent top border, and only the base profile chooses black. The user compared the two products
   side by side on 2026-08-21 and chose the MinSide answer. White on #0b4ea2 measures 8.0:1, well past
   the 4.5:1 the footer needs, so the white foreground tokens F31 removed are correct again — and they
   are back.

   **`--k-brand` moves from #0072CE to #0b4ea2, which closes finding F33.** F33 recorded three CISV
   blues with no owner: #0b4ea2 in the design data, #0c3a6b as the prototype default, and #0072CE
   already in use for `.btn-success` below. Phase 2A picked #0072CE to make the header badge, stepper
   and primary button agree with each other. Min side has since shipped #0b4ea2 for the same tenant,
   and matching it is worth more than matching the legacy button: it is the design data's own value,
   and it makes the two products agree. `.btn-success` below is deliberately NOT changed — it is a
   legacy-shell rule and moving it would be a visible change to a shell this work does not touch.

   `--k-stripe` follows `--k-brand`, which is what both designs do (`Innmelding.dc.html:1165`
   `--k-stripe: m.stripe || brand`; `tokens.css:30` `--k-stripe: var(--k-brand)`), and CISV declares no
   separate stripe colour in either.

   Read only by the new shell — the legacy layout never loads innmelding-design.css, so nothing in
   this block can reach it. */
.inn-body {
    --k-brand: #0b4ea2;
    --k-stripe: #0b4ea2;
    --k-accent: #c4006b;

    /* Added by Phase 2C, and these are the values that now reach text and icons.
       -------------------------------------------------------------------------
       Copied from `Minside/wwwroot/css/theme/72.css`, which had already been signed off against
       **AAA** — the target Innmelding adopted on 2026-08-21 (master plan §17.1 item 1). `--k-soft` is
       the one worth knowing about: the design lightened it from `#bcd9ef`, where brand text on it
       measured 5.45:1 and failed, to `#eaf3fb`. Re-measured here rather than taken on trust:

           --k-primary #0b4ea2 on white  ................. 8.00:1   (AAA needs 7:1)
           --k-primary #0b4ea2 on --k-soft #eaf3fb ....... 7.13:1
           --k-primary #0b4ea2 on --k-tint  #e8f1fa ...... 7.00:1
           --c-fg      #12181f on --k-tint  #e8f1fa ..... 15.64:1

       The third row clears the floor with nothing to spare, so it is the one to re-check if `--k-tint`
       is ever adjusted. It is not the number the membership cards depend on: the text on a selected
       card is `--c-fg`, the fourth row.

       `--k-primary-dark` is dark mode's and is unread here (D13). It is carried so this profile stays
       interchangeable with Min side's.

       **One known remaining difference between the two profiles: Min side's CISV also sets
       `--k-radius: 6px`.** Not adopted here — it is not a colour, so it is outside this phase, and it
       would change every button and card corner in the shell. Recorded rather than absorbed. */
    --k-primary: #0b4ea2;
    --k-primary-dark: #8fc0ee;
    --k-soft: #eaf3fb;
    --k-soft-border: #8ebde3;
    --k-tint: #e8f1fa;

    --k-footer-bg: #0b4ea2;
    --k-footer-fg: #ffffff;
    --k-footer-border: 4px solid #c4006b;

    /* Links share the footer's own text colour rather than the page's link colour, because the
       footer now stands on the brand. `--c-primary` on #0b4ea2 would be blue on blue. */
    --k-footer-lenke: #ffffff;

    /* The tenant typeface. The base declares `--k-font: Verdana, Arial, sans-serif` and
       `design2026/base.css` reads it, so this one line is the whole switch — no rule anywhere needs to
       name the family. The fallbacks are the base’s own stack, so a visitor who never receives the
       webfont sees exactly what CISV saw before this file existed. */
    --k-font: "Source Sans Pro", Verdana, Arial, sans-serif;
}

/* The grey Consio mark, because the default one does not read on a dark blue field.
   =========================================================================
   **This is a rule and not a `--k-*` token, and that is the fix for a real defect.** It was first
   written as `--k-footer-logo: url("../../../images/...")` and consumed through
   `content: var(--k-footer-logo)`. On `https://test.consio.no/InnmeldingV2` the browser requested
   `https://test.consio.no/images/Consio/PoweredByConsio_Grey.png` — off the site root, with the
   application's path segment missing — and the mark rendered as a broken image
   (`Test-result/wrongLogo.png`).

   The cause is not the relative path. **A relative `url()` inside a custom property is resolved against
   the DOCUMENT's address, not against the stylesheet that declared it**, because the value is
   substituted as tokens. From a document at `/InnmeldingV2/CISV/Start`, `../../../images/...` climbs
   past the application entirely. A `url()` written in an ordinary declaration is resolved against its
   own stylesheet, which is the behaviour relative URLs in CSS have always relied on — so from
   `/InnmeldingV2/css/Cust/72/72.css` this resolves to `/InnmeldingV2/images/Consio/…` under a virtual
   directory and to `/images/Consio/…` at the site root, correctly in both.

   **Never write a root-absolute `url("/…")` here either.** It is correct only when the app is served
   at the site root, which the test server is not. Relative, in a plain declaration, is the only form
   that survives both.

   `PoweredByConsio.png` stays in the `src` — only the painted pixels change — so `Cust/71/71.js` still
   finds the literal filename it matches on, and the legacy shell is untouched.

   `.inn-body` scopes this to the new shell; `innmelding-design.css` no longer declares any `content`
   for `.footerLogo`, so this is the only rule that swaps it. */
    .inn-body .footerLogo {
        content: url("../../../images/Consio/Consio_Grey_Alt.png");
    }

#appBox {
    padding-top: 10px;
}

.form-logo {
    height: 90px;
}


.btn-success {
    background-color: rgb(0, 114, 206) !important;
    border-color: rgb(0, 114, 206) !important;
    color: #ffffff !important;
}



@media (max-width: 768px) {

    .form-body{
        margin-top:40px;
    }

}