/* Sikkerhet og tillit (/trust-center): the site's navy-on-white identity, set for long
   reading — a quiet topbar, a section nav, one readable column. Base tokens
   (--navy, --text-secondary) come from base.css; heading sizes are scoped down here
   because base.css sizes h1/h2 for the marketing homepage. */

.tc-topbar {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid rgba(19, 51, 85, 0.1);
    background: var(--white);
}

.tc-logo img { display: block; height: 30px; width: auto; }

.tc-topbar-label {
    color: var(--text-secondary);
    font-size: 0.9rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    border-left: 1px solid rgba(19, 51, 85, 0.2);
    padding-left: 0.75rem;
}

.tc-home {
    margin-left: auto;
    font-size: 0.95rem;
    font-weight: 500;
}

.tc-layout {
    display: grid;
    grid-template-columns: 240px minmax(0, 1fr);
    gap: 3rem;
    max-width: 1180px;
    margin: 0 auto;
    padding: 2.5rem 1.5rem 4rem;
}

/* components.css styles every <nav> as the sticky homepage bar; reset that here (base.css's
   overflow-x: hidden on html and body would stop a sticky side nav from sticking anyway). */
nav.tc-nav {
    position: static;
    z-index: auto;
    align-self: start;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    background: transparent;
    border: 0;
}

.tc-nav a {
    display: block;
    padding: 0.55rem 0.75rem;
    border-radius: 0.4rem;
    color: var(--navy);
    font-size: 0.98rem;
    font-weight: 500;
    line-height: 1.35;
}

.tc-nav a:hover { background: rgba(19, 51, 85, 0.06); opacity: 1; }

.tc-nav a[aria-current="page"] {
    background: var(--navy);
    color: var(--white);
}

.tc-main {
    min-width: 0;
    max-width: 780px;
    color: var(--navy);
}

.tc-main h1 {
    font-size: 2.4rem;
    letter-spacing: -0.03em;
    margin-bottom: 1rem;
}

.tc-main h2 {
    font-size: 1.45rem;
    letter-spacing: -0.02em;
    line-height: 1.3;
    margin-bottom: 0.75rem;
}

.tc-main h3 {
    font-size: 1.15rem;
    letter-spacing: -0.01em;
    margin-bottom: 0.6rem;
}

.tc-main p,
.tc-main li,
.tc-main dd {
    font-size: 1.02rem;
    line-height: 1.7;
    color: var(--text-secondary);
}

.tc-main a { color: #2C5F8D; text-decoration: underline; text-underline-offset: 2px; }
.tc-main a.btn { color: var(--white); text-decoration: none; }

.tc-eyebrow {
    font-size: 0.85rem !important;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    margin-bottom: 0.25rem;
}

.tc-page-head { margin-bottom: 2rem; }
.tc-intro { font-size: 1.15rem !important; color: var(--navy) !important; }

.tc-ramme {
    border-left: 3px solid var(--navy);
    padding-left: 1rem;
}

.tc-block { margin: 2.5rem 0; }

.tc-docs {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: 0.6rem;
}

.tc-docs li {
    padding: 0.8rem 1rem;
    border: 1px solid rgba(19, 51, 85, 0.12);
    border-radius: 0.5rem;
    background: #FBFBF9;
}

.tc-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1rem;
}

.tc-main a.tc-card {
    display: block;
    padding: 1.25rem;
    border: 1px solid rgba(19, 51, 85, 0.14);
    border-radius: 0.6rem;
    text-decoration: none;
    color: var(--navy);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.tc-main a.tc-card:hover {
    opacity: 1;
    border-color: var(--navy);
    box-shadow: 0 4px 14px rgba(19, 51, 85, 0.08);
}

.tc-card p { font-size: 0.95rem !important; margin: 0; }

nav.tc-toc {
    position: static;
    z-index: auto;
}

.tc-toc {
    background: #FBFBF9;
    border: 1px solid rgba(19, 51, 85, 0.12);
    border-radius: 0.6rem;
    padding: 1.25rem 1.5rem;
    margin-bottom: 2.5rem;
}

.tc-toc h2 { font-size: 1.05rem; margin-bottom: 0.5rem; }
.tc-toc ol { margin: 0; padding-left: 1.25rem; }
.tc-toc li { font-size: 0.98rem; line-height: 1.6; }

/* A grouped page opens on one card per group; each group then starts with its heading and its own
   question list, and its answers and tables sit one heading level lower (h3, h4) than on other pages. */
nav.tc-innganger {
    position: static;
    z-index: auto;
    background: transparent;
    border: 0;
}

.tc-card .tc-antall { margin-top: 0.6rem; font-size: 0.85rem !important; }

.tc-gruppe {
    margin-top: 3rem;
    padding-top: 1.5rem;
    border-top: 3px solid var(--navy);
}

.tc-main .tc-gruppe h2 { font-size: 1.7rem; scroll-margin-top: 1rem; }
ol.tc-toc { padding-left: 2.75rem; margin: 0 0 1rem; }
.tc-main .tc-svar h3 { font-size: 1.3rem; line-height: 1.35; }
.tc-main .tc-tabell h4 { font-size: 1.05rem; margin-bottom: 0.6rem; }

.tc-svar {
    padding: 2rem 0;
    border-top: 1px solid rgba(19, 51, 85, 0.12);
    scroll-margin-top: 1rem;
}

.tc-kort p { color: var(--navy) !important; font-weight: 500; }

.tc-detaljer ul,
.tc-gjor ul,
.tc-kort ul { padding-left: 1.25rem; margin-bottom: 1rem; }

/* The part labels read as small caps above their text, not as headings: two headings per answer would
   crowd the page outline. «Dette gjør dere» sits in a quiet box in the brand colour, never green. */
.tc-main .tc-etikett {
    margin: 1.25rem 0 0.35rem;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--navy);
}

.tc-gjor {
    margin: 1rem 0;
    padding: 0.1rem 1rem 0.1rem 1rem;
    border-left: 3px solid var(--navy);
    background: #FBFBF9;
}

.tc-gjor .tc-etikett { margin-top: 0.75rem; }
.tc-gjor ul { margin-bottom: 0.75rem; }
.tc-gjor li { color: var(--navy); }

.tc-dok { font-size: 0.95rem !important; }

.tc-dato {
    font-size: 0.85rem !important;
    color: var(--text-secondary) !important;
    margin: 0;
}

/* Each answer ends on its date and a «Kopier lenke» button (review §3: an action the reader understands, not a
   «#»). The button and the decision pack's print button are rendered hidden until trust.js shows them. */
.tc-svar-fot {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem 1rem;
    margin-top: 1.25rem;
}

.tc-main [hidden] { display: none !important; }

.tc-kopier {
    padding: 0.35rem 0.75rem;
    border: 1px solid rgba(19, 51, 85, 0.3);
    border-radius: 0.4rem;
    background: transparent;
    color: var(--navy);
    font: inherit;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
}

.tc-kopier:hover { border-color: var(--navy); }
.tc-kopier:focus-visible { outline: 2px solid var(--navy); outline-offset: 2px; }
.tc-skriv-ut { margin-top: 0.5rem; }

.tc-sr {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
}

/* base.css scrolls smoothly for the homepage. Here a link straight to a deep answer must land on it: loaded
   directly at 390 px wide, the smooth scroll stopped 150-290 px short of the answer, an instant one on it. */
html:has(.tc-layout) { scroll-behavior: auto; }

.tc-tabell { margin: 0.5rem 0 2rem; scroll-margin-top: 1rem; }

.tc-table-wrap {
    overflow-x: auto;
    border: 1px solid rgba(19, 51, 85, 0.14);
    border-radius: 0.5rem;
}

.tc-table-wrap table {
    border-collapse: collapse;
    width: 100%;
    min-width: 560px;
    font-size: 0.93rem;
}

.tc-table-wrap th,
.tc-table-wrap td {
    text-align: left;
    vertical-align: top;
    padding: 0.65rem 0.8rem;
    border-bottom: 1px solid rgba(19, 51, 85, 0.1);
    color: var(--navy);
    line-height: 1.5;
}

.tc-table-wrap thead th {
    background: #F2F4F7;
    font-weight: 600;
}

.tc-table-wrap tbody th { font-weight: 600; }
.tc-table-wrap tr:last-child th,
.tc-table-wrap tr:last-child td { border-bottom: 0; }

.tc-note { font-size: 0.92rem !important; margin-top: 0.6rem; }

.tc-flow {
    margin: 0 0 2.5rem;
    padding: 1.5rem;
    border-radius: 0.6rem;
    background: #FBFBF9;
    border: 1px solid rgba(19, 51, 85, 0.12);
}

.tc-flow-steps {
    list-style: none;
    padding: 0;
    margin: 0 0 1rem;
    display: grid;
    gap: 0.75rem;
}

.tc-flow-steps li {
    display: grid;
    grid-template-columns: 9rem minmax(0, 1fr);
    gap: 1rem;
    align-items: baseline;
    padding: 0.8rem 1rem;
    background: var(--white);
    border: 1px solid rgba(19, 51, 85, 0.14);
    border-radius: 0.5rem;
}

.tc-flow-who { font-weight: 700; color: var(--navy); }

.tc-contact {
    margin-top: 3rem;
    padding: 2rem;
    border-radius: 0.8rem;
    background: var(--navy);
}

.tc-contact h2,
.tc-contact p { color: var(--white) !important; }
.tc-main .tc-contact a.btn { background: var(--white); color: var(--navy); }
.tc-main .tc-contact a:not(.btn) { color: var(--white); }

/* The overview: two ways on (see the product, find the documentation), then answers before links. */
.tc-cta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin: 1.5rem 0;
}

.tc-main a.btn-secondary { color: var(--navy); }
.tc-main a.btn-secondary:hover { color: var(--white); }

.tc-hovedsvar {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr));
    gap: 1rem;
}

.tc-hovedsvar-kort {
    padding: 1.25rem;
    border: 1px solid rgba(19, 51, 85, 0.14);
    border-radius: 0.6rem;
    background: #FBFBF9;
}

.tc-hovedsvar-kort p,
.tc-vanlig p { margin-bottom: 0.5rem; }

.tc-hovedsvar-kort p:not(.tc-dok),
.tc-vanlig p:not(.tc-dok) { color: var(--navy); }

.tc-vanlig {
    padding: 1.25rem 0;
    border-top: 1px solid rgba(19, 51, 85, 0.12);
}

.tc-vanlig:first-child { border-top: 0; padding-top: 0.25rem; }

.tc-sok label {
    display: block;
    font-weight: 600;
    color: var(--navy);
    margin-bottom: 0.4rem;
}

.tc-sok-felt {
    display: flex;
    gap: 0.5rem;
}

.tc-sok input {
    flex: 1;
    min-width: 0;
    padding: 0.75rem 0.9rem;
    font: inherit;
    font-size: 1rem;
    color: var(--navy);
    border: 1.5px solid rgba(19, 51, 85, 0.6);  /* ≥ 3:1 on white (WCAG 1.4.11) */
    border-radius: 0.5rem;
}

.tc-sok input:focus-visible { outline: 3px solid rgba(44, 95, 141, 0.35); border-color: var(--navy); }
.tc-sok button { padding: 0.75rem 1.5rem; }
.tc-eksempler { font-size: 0.95rem !important; margin-top: 0.6rem; }

.tc-treff { margin-top: 2rem; }
.tc-treffliste { list-style: none; padding: 0; margin: 0; }

.tc-treffliste li {
    padding: 1rem 0;
    border-top: 1px solid rgba(19, 51, 85, 0.12);
}

.tc-treffliste li > a { font-weight: 600; font-size: 1.05rem; }
.tc-treff-side { display: block; font-size: 0.85rem; color: var(--text-secondary); margin-top: 0.15rem; }
.tc-treffliste p { margin: 0.35rem 0 0; }
.tc-treffliste mark { background: #FFF1B8; color: inherit; padding: 0 0.1em; }

.tc-docs li span { display: block; font-size: 0.95rem; }

.tc-neste-valg {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr));
    gap: 1.5rem;
    margin-top: 1rem;
}

.tc-neste h3 { color: var(--white); }
.tc-neste-oppstart { margin: 1.5rem 0 0; }

@media (max-width: 560px) {
    .tc-cta .btn { flex: 1 1 100%; padding: 0.8rem 1rem; }
    .tc-sok button { padding: 0.75rem 1rem; }
}

.tc-footer {
    border-top: 1px solid rgba(19, 51, 85, 0.1);
    padding: 1.5rem;
    text-align: center;
}

.tc-footer p { font-size: 0.9rem; margin: 0.25rem 0; }

@media (max-width: 960px) {
    .tc-layout {
        grid-template-columns: minmax(0, 1fr);
        gap: 1.5rem;
        padding: 1.25rem 1rem 3rem;
    }

    nav.tc-nav {
        position: static;
        flex-direction: row;
        overflow-x: auto;
        gap: 0.4rem;
        padding-bottom: 0.25rem;
        scrollbar-width: none;
        -webkit-overflow-scrolling: touch;
    }

    .tc-nav a {
        white-space: nowrap;
        border: 1px solid rgba(19, 51, 85, 0.15);
        font-size: 0.92rem;
    }

    .tc-main h1 { font-size: 1.9rem; }
    .tc-topbar { padding: 0.85rem 1rem; }
    .tc-topbar-label { display: none; }
}

@media (max-width: 560px) {
    .tc-flow-steps li { grid-template-columns: minmax(0, 1fr); gap: 0.25rem; }
    .tc-contact { padding: 1.5rem; }

    /* On a phone a table with three or four text columns scrolls its last columns out of view, so
       each row stacks: the row heading, then every cell under its column name. */
    .tc-table-wrap { overflow-x: visible; }
    .tc-table-wrap table { min-width: 0; }
    .tc-table-wrap thead {
        position: absolute;
        width: 1px;
        height: 1px;
        overflow: hidden;
        clip: rect(0 0 0 0);
        white-space: nowrap;
    }
    .tc-table-wrap tr {
        display: block;
        padding: 0.65rem 0.8rem;
        border-bottom: 1px solid rgba(19, 51, 85, 0.1);
    }
    .tc-table-wrap tr:last-child { border-bottom: 0; }
    .tc-table-wrap tbody th,
    .tc-table-wrap td {
        display: block;
        padding: 0.15rem 0;
        border-bottom: 0;
    }
    .tc-table-wrap td:empty { display: none; }
    /* The label is visual only: the table header already names the column for a screen reader.
       An engine without the «/ ""» alternative-text syntax drops that line and keeps the first. */
    .tc-table-wrap td::before {
        content: attr(data-label);
        content: attr(data-label) / "";
        display: block;
        margin-top: 0.35rem;
        font-size: 0.8rem;
        font-weight: 600;
        color: var(--text-secondary);
    }
}

/* Print, and the PDF a browser saves from the same page: one column of answers and tables. Navigation, question
   lists, buttons and the contact box drop out; the topbar's logo stays as the document's header, and on a grouped page
   the entry cards stay as its contents, with each group starting a new page. */
@media print {
    nav.tc-nav,
    nav.tc-toc,
    ol.tc-toc,
    .tc-contact,
    .tc-kopier,
    .tc-skriv-ut,
    .tc-home,
    .tc-footer p + p { display: none !important; }

    .tc-topbar { padding: 0 0 0.75rem; }
    .tc-layout { display: block; max-width: none; padding: 1.5rem 0 0; }
    .tc-main { max-width: none; }
    .tc-main h1 { font-size: 20pt; }
    .tc-main p,
    .tc-main li { font-size: 10.5pt; line-height: 1.5; }
    .tc-main h2,
    .tc-main h3,
    .tc-main h4,
    .tc-main .tc-etikett { break-after: avoid; break-inside: avoid; }
    /* The date line, and on the pack the answer's source, stays with the answer it describes. */
    .tc-svar-fot { break-before: avoid; }
    .tc-kort,
    .tc-gjor,
    .tc-main a.tc-card,
    .tc-table-wrap tr { break-inside: avoid; }
    .tc-gruppe { break-before: page; }
    .tc-svar { padding: 1rem 0; }
    .tc-table-wrap { overflow: visible; }
    .tc-table-wrap table { min-width: 0; font-size: 9pt; }
    /* A word breaks only when it cannot fit its column on its own, so a table stays inside the page. */
    .tc-table-wrap th,
    .tc-table-wrap td { padding: 0.4rem 0.5rem; overflow-wrap: break-word; }
}
