/* COPY of _m-shared/assets/m-base.css – edit only the master, never this copy. */
/*
 * m-base.css – the shared base of the small sites (site kit): fonts of the
 * text, reset, container, page effects, text markup (lists, tables, links),
 * skip link, two-column pages with a box, footer line.
 * MASTER: _m-shared/assets/m-base.css. Each site has a COPY in its
 * assets/ (Claude copies it after every change) – edit only the master.
 * Load it before the site's brand file (setting styles), which sets the
 * variables (--clr-…, --font-…, --ft-…, --effect …) and everything that is
 * the site's own.
 * Built 01.12.2026 from what lernenundpunkten.com and crossbell.net shared
 * (site kit steps D1, D2).
 */


/* 1. Fonts ------------------------------------------------------------------------
   Source Sans 3 Regular and Bold (the text font of all small sites), three
   parts each: basic Latin, extended Latin (cs, pl …), Cyrillic (uk, ru),
   and its fallback: Arial resized to the same width, so nothing jumps
   while the font loads. The font files lie in each site's assets/fonts/. */

@font-face {
    font-family: 'Source Sans 3';
    font-weight: 400;
    font-display: swap;
    src: url('/assets/fonts/source-sans-3-latin-400.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: 'Source Sans 3';
    font-weight: 400;
    font-display: swap;
    src: url('/assets/fonts/source-sans-3-latin-ext-400.woff2') format('woff2');
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
    font-family: 'Source Sans 3';
    font-weight: 400;
    font-display: swap;
    src: url('/assets/fonts/source-sans-3-cyrillic-400.woff2') format('woff2');
    unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

@font-face {
    font-family: 'Source Sans 3';
    font-weight: 700;
    font-display: swap;
    src: url('/assets/fonts/source-sans-3-latin-700.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: 'Source Sans 3';
    font-weight: 700;
    font-display: swap;
    src: url('/assets/fonts/source-sans-3-latin-ext-700.woff2') format('woff2');
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
    font-family: 'Source Sans 3';
    font-weight: 700;
    font-display: swap;
    src: url('/assets/fonts/source-sans-3-cyrillic-700.woff2') format('woff2');
    unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

@font-face {
    font-family: 'Source Sans 3 Fallback';
    font-weight: 400;
    src: local('Arial'), local('ArialMT');
    size-adjust: 92.81%;
    ascent-override: 110.34%;
    descent-override: 43.10%;
    line-gap-override: 0%;
}

@font-face {
    font-family: 'Source Sans 3 Fallback';
    font-weight: 700;
    src: local('Arial Bold'), local('Arial-BoldMT');
    size-adjust: 91.41%;
    ascent-override: 112.03%;
    descent-override: 43.76%;
    line-gap-override: 0%;
}



/* 2. Base, text and layout -------------------------------------------------------- */

* {
    box-sizing: border-box;
}

html {
    -webkit-text-size-adjust: 100%;
}

.container {
    width: 100%;
    max-width: var(--max-w);
    margin: 0 auto;
    padding: 0 var(--gutter);
}

/* The effects of --effect (set in the brand file): the page content
   appears once. */
@keyframes slide-up {
    from {
        opacity: 0;
        transform: translateY(12px);
    }
    to {
        opacity: 1;
        transform: none;
    }
}

@keyframes fade {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.page {
    max-width: var(--text-max);
}

.text-link {
    font-weight: 400;
}

.text-list li {
    position: relative;
    padding-bottom: 0.3rem;
    line-height: 1.5;
}

.text-table table {
    width: 100%;
    border-collapse: collapse;
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
}

.skip-link:focus {
    top: 0.5rem;
}

/* Two columns: title and text 2/3, box 1/3 on the right (a page with
   _pages/<key>-box.txt). In the HTML the box comes after the title, so on
   phones (one column) it stands between title and text. */
.split {
    display: grid;
    grid-template-columns: 2fr 1fr;
    grid-template-areas:
        "title box"
        "text  box";
    column-gap: calc(var(--gap) * 2);
    align-items: start;
}

.split-title {
    grid-area: title;
}

.split .box {
    grid-area: box;
}

.split-text {
    grid-area: text;
}

/* Box: a little space between the heading and a list below it; list
   lines as close as the box text (bullet centred on the 1.4 line). */
.box .text-h2 + .text-list {
    margin-top: 0.8rem;
}

/* Box: a bold lead line under the heading, its list close below it. */
.box .text-h2 + p {
    margin: 0.8rem 0 0.4rem 0;
}

.box .text-h2 + p + .text-list {
    margin-top: 0.4rem;
}

.box .text-list li::before {
    top: 0.525em;
}

.footer-copy {
    margin: 0;
}


/* 3. Page, text, top bar and footer: what all small sites share ----------------------
   The brand file adds its own values after this (it comes later, so it
   wins): colours and sizes through the variables, plus the site's own
   properties of the same rules (e.g. margins, the top bar colours). */

/* The footer always sits at the bottom of the window, also on short pages. */
body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    margin: 0;
    background: var(--clr-page-bg);
    color: var(--clr-text);
    font-family: var(--font-text);
    font-size: var(--ft-body);
    line-height: 1.6;
}

main.container {
    flex: 1 0 auto;
    animation: var(--effect) var(--effect-time) ease-out;
}

/* Links: always underlined, one colour – a 2 px dotted line in a lighter
   tone (rule "Colour proportion" in CLAUDE.md). The line shows that it is
   a link, not the colour alone. */
a {
    color: var(--clr-link);
    text-decoration: underline dotted 2px var(--clr-link-line);
    text-underline-offset: 0.22em;
}

h1 {
    margin: 2rem 0 1rem 0;
    font-size: var(--ft-h1);
}

.text-h2 {
    padding-bottom: 0.35em;
    border-bottom: var(--title-line-width) solid var(--clr-title-line);
    font-size: var(--ft-h2);
}

.text-list {
    list-style: none;
    padding-left: 1.5rem;
}

.text-list li::before {
    content: "";
    position: absolute;
    top: 0.575em;
    left: calc(-1.2rem - 2px);
    width: 0.35em;
    height: 0.35em;
    border-radius: 50%;
    background: var(--clr-bullet);
}

.text-table {
    overflow-x: auto;
}

/* "Skip to content": hidden above the window, visible on keyboard focus. */
.skip-link {
    position: absolute;
    top: -3rem;
    left: 1rem;
    z-index: 20;
    padding: 0.5rem 1rem;
    background: var(--clr-white);
    color: var(--clr-black);
}

.topbar-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.box {
    margin-top: 2rem;
    padding: 0.2rem 1.4rem 1rem 1.4rem;
    background: var(--clr-box-bg);
    border-radius: var(--radius);
}

.box .text-h2 {
    margin-top: 1rem;
}

.footer {
    color: var(--clr-footer-text);
    font-size: 0.9rem;
}

.footer-inner {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
}

.footer-links {
    display: flex;
    margin: 0;
    padding: 0;
    list-style: none;
}


/* 4. Shared contact form (_m-shared/contact/contact-form.php) ------------------------
   The grey card around it, labels, fields, error and thank-you messages,
   the trap field for bots. Colours from the brand file: --clr-error
   (default #b42318), --clr-success-line (default: the title line colour),
   --clr-link-grey (links on grey; default: the link colour). The send
   button (.btn-submit) is styled in the brand file. */

.form-card {
    --card-pad-x: 1.4rem;                 /* side space; the thank-you line uses it */
    margin-top: 2.5rem;
    padding: 1.2rem var(--card-pad-x) 1.4rem var(--card-pad-x);
    background: var(--clr-box-bg);
    border-radius: var(--radius);
}

.form-card a {
    color: var(--clr-link-grey, var(--clr-link));
}

.form-title {
    margin: 0.3rem 0 1.2rem 0;
    font-size: var(--ft-h2);
}

.form-group {
    margin-bottom: 1.1rem;
}

.form-label {
    display: block;
    margin-bottom: 0.35rem;
    font-weight: 700;
}

.form-control {
    width: 100%;
    padding: 0.6rem 0.75rem;
    background: var(--clr-white);
    border: 1px solid var(--clr-grey-strong);
    border-radius: var(--radius);
    color: var(--clr-black);
    font-family: inherit;
    font-size: inherit;
}

.form-control:focus {
    outline: 2px solid var(--clr-focus);
    outline-offset: 1px;
    border-color: var(--clr-focus);
}

textarea.form-control {
    resize: vertical;
}

.form-control[aria-invalid="true"] {
    border-color: var(--clr-error, #b42318);
}

.form-error {
    margin: 0.3rem 0 0 0;
    color: var(--clr-error, #b42318);
    font-size: 0.9rem;
    font-weight: 700;
}

.form-counter,
.form-note {
    color: var(--clr-text-soft);
    font-size: 0.85rem;
}

.form-counter {
    margin: 0.2rem 0 0 0;
    text-align: right;
}

.form-alert,
.form-success {
    margin: 0 0 1.2rem 0;
    padding: 0.9rem 1.2rem;
    background: var(--clr-white);
    border-left: 4px solid var(--clr-error, #b42318);
}

.form-alert p {
    margin: 0;
    color: var(--clr-error, #b42318);
    font-weight: 700;
}

/* Thank-you message: no own background, the form card shows through; a
   line in the success colour on the left. */
.form-success {
    background: transparent;
    border-left-color: var(--clr-success-line, var(--clr-title-line));
}

/* In the grey form card the success line runs along the whole left edge
   of the card (top to bottom) while it shows the thank-you message; the
   message itself then has no line and no extra space. Browsers without
   :has() keep the line on the message only. */
.form-card:has(.form-success) {
    border-left: 4px solid var(--clr-success-line, var(--clr-title-line));
}

.form-card .form-success {
    margin: 0;
    padding: 0;
    border-left: 0;
}

.form-success > :last-child {
    margin-bottom: 0;
}

.form-success h2 {
    margin-top: 0;
}

/* Trap field for bots: off screen (not display:none – some bots skip it). */
.form-hp {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}
