/* Therapiezentrum Wedel styleguide (März 2026): Parkinsans, Salbei, pill buttons. */
@font-face {
    font-family: 'Parkinsans';
    font-style: normal;
    font-weight: 400 600;
    font-display: swap;
    src: url("../fonts/parkinsans-latin-sYUbquy.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: 'Parkinsans';
    font-style: normal;
    font-weight: 400 600;
    font-display: swap;
    src: url("../fonts/parkinsans-latin-ext-pCvCblp.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;
}

:root {
    --salbei: #647264;
    --salbei-dark: #556356;
    --salbei-hell: #8b9b7e;
    --salbei-light: #c5d1c0;
    --anthrazit: #2f3433;
    --copy: #465046;
    --bg: #f5f7f4;
    --surface: #ffffff;
    --line: #c5d1c0;
    --danger: #a32121;
    --danger-weak: #fbeaea;
    --radius-s: 8px;
    --radius-m: 12px;
    --radius-l: 16px;
    --pill: 50px;
    --gutter: 16px;
    font-family: Parkinsans, system-ui, sans-serif;
    font-size: 16px;
    color: var(--copy);
    background: var(--bg);
}

* { box-sizing: border-box; }
body { margin: 0; min-height: 100dvh; display: flex; flex-direction: column; background: var(--bg); }
a { color: var(--salbei); }
h1, h2, h3 { color: var(--anthrazit); font-weight: 500; line-height: 1.25; }
h2 { font-size: 24px; }
.icon { flex: none; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 2px solid var(--salbei); outline-offset: 2px; }

/* Header */
.site-header {
    display: flex; align-items: center; gap: 32px;
    padding: 20px 64px; background: var(--surface); border-bottom: 1px solid var(--line);
}
.brand { flex: 1; display: grid; gap: 6px; justify-items: start; text-decoration: none; }
.brand img { display: block; height: 40px; width: auto; }
.brand__portal { color: var(--copy); font-size: 10px; font-weight: 500; letter-spacing: 1.6px; text-transform: uppercase; }
.site-nav { display: flex; gap: 32px; align-self: stretch; }
.site-nav a {
    display: flex; align-items: center; padding: 12px 0; margin-bottom: -21px;
    color: var(--copy); text-decoration: none; border-bottom: 2px solid transparent;
}
.site-nav a[aria-current="page"] { color: var(--salbei); font-weight: 500; border-bottom-color: var(--salbei); }
.site-nav a:hover { color: var(--salbei); }

.account { position: relative; padding-left: 24px; border-left: 1px solid var(--line); }
.account summary { display: flex; align-items: center; gap: 12px; cursor: pointer; list-style: none; color: var(--copy); font-size: 14px; }
.account summary::-webkit-details-marker { display: none; }
.account__avatar { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--bg); color: var(--salbei); }
.account[open] summary > .icon { transform: rotate(180deg); }
.account__menu {
    position: absolute; right: 0; top: calc(100% + 10px); z-index: 10; min-width: 220px;
    display: grid; gap: 10px; padding: 16px; background: var(--surface);
    border: 1px solid var(--line); border-radius: var(--radius-m); box-shadow: 0 8px 24px rgb(47 52 51 / .08);
}
.account__email { font-size: 13px; overflow-wrap: anywhere; }

/* Page */
.site-main { flex: 1; width: 100%; max-width: 1440px; margin: 0 auto; padding: 48px 120px 40px; }
.site-main--wide { padding-top: 32px; }
.site-main--center { display: grid; place-items: center; }
.site-footer { display: flex; justify-content: space-between; gap: 16px; padding: 24px 64px; font-size: 12px; }
.site-footer a { text-decoration: none; }

.page-intro { display: grid; gap: 12px; margin-bottom: 32px; }
.page-title, .page-intro h1 { margin: 0; font-size: 42px; line-height: 53px; color: var(--salbei); }
.page-intro p { margin: 0; font-size: 17px; line-height: 30px; }

.notice, .alert { padding: 12px 16px; border-radius: var(--radius-m); }
.notice { background: var(--surface); border: 1px solid var(--line); }
.alert { background: var(--danger-weak); color: var(--danger); }
.empty { padding: 32px 24px; text-align: center; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-l); }

/* Buttons: pills, primary filled, secondary outline (styleguide §3) */
.button {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    padding: 12px 28px; border-radius: var(--pill); border: 2px solid var(--salbei);
    background: var(--salbei); color: #fff; font: inherit; font-weight: 500; text-decoration: none; cursor: pointer;
}
.button:hover { background: var(--salbei-dark); border-color: var(--salbei-dark); }
.button--secondary { background: transparent; color: var(--salbei); }
.button--secondary:hover { background: var(--salbei); border-color: var(--salbei); color: #fff; }
.button--danger { background: var(--danger); border-color: var(--danger); }
.button--danger:hover { background: #861b1b; border-color: #861b1b; }
.button__note { font-weight: 400; opacity: .75; }

/* Overview */
.search {
    display: flex; align-items: center; gap: 12px; height: 60px; padding: 0 20px;
    background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-m); color: var(--anthrazit);
}
.search:focus-within { border-color: var(--salbei); box-shadow: 0 0 0 3px rgb(100 114 100 / .15); }
.search input { flex: 1; min-width: 0; height: 100%; border: 0; outline: 0; background: none; font: inherit; color: var(--anthrazit); }
.search input::placeholder { color: var(--copy); }

.filters { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin: 20px 0 32px; }
.chips { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; }
.chip {
    flex: none; display: inline-flex; align-items: baseline; gap: 10px; padding: 11px 20px;
    border-radius: var(--pill); border: 1px solid var(--line); background: var(--surface);
    color: var(--copy); text-decoration: none; font-size: 14px; font-weight: 500;
}
.chip:hover { border-color: var(--salbei); }
.chip--active { background: var(--salbei); border-color: var(--salbei); color: #fff; }
.chip .count { font-size: 13px; font-weight: 400; }

.sort { flex: none; display: flex; align-items: center; gap: 8px; color: var(--copy); font-size: 14px; }
.sort select {
    appearance: none; border: 0; background: transparent no-repeat right center / 16px
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23465046' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    padding: 6px 24px 6px 2px; font: inherit; color: inherit; cursor: pointer;
}

.documents { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-l); overflow: hidden; }
.documents__head, .artifact-list a { display: grid; grid-template-columns: 64px 1fr 160px 106px; gap: 24px; align-items: center; }
.documents__head { padding: 18px 24px; border-bottom: 1px solid var(--line); font-size: 11px; font-weight: 500; letter-spacing: 1.3px; text-transform: uppercase; }
.documents__head span:first-child { grid-column: 1 / 3; }
.artifact-list { list-style: none; margin: 0; padding: 0; }
.artifact-list li + li { border-top: 1px solid var(--line); }
.artifact-list a { padding: 24px; color: var(--copy); text-decoration: none; }
.artifact-list a:hover { background: var(--bg); }
.artifact-list a:hover .title { color: var(--salbei); }
.type {
    display: grid; place-items: center; align-content: center; gap: 5px; width: 64px; height: 72px;
    border-radius: var(--radius-m); background: var(--bg); color: var(--salbei); font-size: 10px; font-weight: 500;
}
.details { display: grid; gap: 8px; min-width: 0; }
.title { color: var(--anthrazit); font-size: 18px; font-weight: 500; line-height: 25px; }
.artifact-list .meta, .date { font-size: 14px; }
.open { display: inline-flex; align-items: center; justify-content: flex-end; gap: 8px; color: var(--salbei); font-size: 14px; font-weight: 500; }
.results { display: flex; justify-content: space-between; gap: 16px; margin: 24px 0 0; font-size: 13px; }

.badge { display: inline-block; padding: 2px 10px; border-radius: var(--pill); font-size: 12px; background: var(--bg); }
.badge--expired { background: var(--danger-weak); color: var(--danger); }

/* Document page */
.back { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; text-decoration: none; margin-bottom: 16px; }
.artifact__header { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; flex-wrap: wrap; margin-bottom: 24px; }
.artifact__heading { display: grid; gap: 8px; min-width: 0; }
.artifact__header h1 { margin: 0; font-size: 32px; overflow-wrap: anywhere; }
.artifact__header .meta { margin: 0; font-size: 14px; }
.format { font-weight: 500; color: var(--salbei); }
.toolbar { display: flex; gap: 12px; flex-wrap: wrap; }
.toolbar .button { padding: 10px 22px; font-size: 15px; white-space: nowrap; }
.viewer { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-l); overflow: hidden; }
.artifact-frame { display: block; width: 100%; height: calc(100dvh - 300px); min-height: 480px; border: 0; background: #fff; }
.viewer:fullscreen { border: 0; border-radius: 0; }
.viewer:fullscreen .artifact-frame { height: 100dvh; }
.prose { padding: 32px 40px; color: var(--copy); font-size: 17px; line-height: 1.75; overflow-x: auto; }
.prose > :first-child { margin-top: 0; }
.prose h1 { font-size: 32px; } .prose h2 { font-size: 24px; } .prose h3 { font-size: 20px; font-weight: 400; }
.prose table { border-collapse: collapse; font-size: 15px; line-height: 1.5; }
.prose th, .prose td { border: 1px solid var(--line); padding: 8px 12px; text-align: left; vertical-align: top; }
.prose th { background: var(--bg); color: var(--anthrazit); font-weight: 500; }

/* Login and other single cards; the brand arc only on the welcome card (styleguide §6) */
.login {
    position: relative; overflow: hidden; width: 100%; max-width: 520px; margin: 0 auto;
    display: grid; gap: 16px; justify-items: start; padding: 48px;
    background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-l);
}
.login h1 { margin: 0; font-size: 32px; }
.login p { margin: 0; line-height: 1.6; }
.login form { display: flex; gap: 12px; flex-wrap: wrap; }
.eyebrow { color: var(--salbei); font-size: 14px; font-weight: 500; letter-spacing: 1.5px; text-transform: uppercase; }
.login--welcome { max-width: 640px; padding-right: 200px; }
.login--welcome .button { white-space: nowrap; }
.login--welcome::after {
    --a: 150px; /* arc width = a, stroke = 0.3 a, cut off by the card's edges */
    content: ""; position: absolute; right: calc(var(--a) * -1); bottom: calc(var(--a) * -1);
    width: calc(var(--a) * 2); height: calc(var(--a) * 2); border-radius: 50%;
    border: calc(var(--a) * .3) solid var(--salbei-light); pointer-events: none;
}
.login--welcome .button { margin-top: 8px; }

/* Verwaltung: section tabs, then the page's own filter chips */
.admin-nav { display: flex; gap: 32px; flex-wrap: wrap; margin-bottom: 24px; border-bottom: 1px solid var(--line); }
.admin-nav .chip { padding: 12px 0; margin-bottom: -1px; border: 0; border-bottom: 2px solid transparent; border-radius: 0; background: none; font-size: 16px; font-weight: 400; }
.admin-nav .chip--active { color: var(--salbei); font-weight: 500; border-bottom-color: var(--salbei); }
.site-main > .chips { margin-bottom: 20px; }
.site-main > h1 { margin-top: 0; font-size: 32px; }
.table { width: 100%; border-collapse: separate; border-spacing: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-l); overflow: hidden; font-size: 14px; }
.table th, .table td { text-align: left; padding: 14px 16px; border-bottom: 1px solid var(--line); vertical-align: top; }
.table tr:last-child td { border-bottom: 0; }
.table th { font-size: 11px; font-weight: 500; letter-spacing: 1.3px; text-transform: uppercase; }
.table .button { padding: 6px 16px; font-size: 14px; }
.inline-form { display: inline; }
.form-row { display: grid; gap: 6px; margin-bottom: 16px; max-width: 520px; }
.form-row input, .form-row select { padding: 10px 14px; font: inherit; color: var(--anthrazit); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-s); }

/* Phones and small tablets */
@media (max-width: 960px) {
    .site-header { flex-wrap: wrap; gap: 12px 24px; padding: 16px var(--gutter) 0; }
    .brand img { height: 32px; }
    .site-nav { order: 3; width: 100%; }
    .site-nav a { margin-bottom: 0; }
    .account { padding-left: 0; border-left: 0; }
    .account__name { display: none; }
    .site-main { padding: 32px var(--gutter); }
    .site-footer { padding: 24px var(--gutter); }
    .page-title, .page-intro h1 { font-size: 32px; line-height: 40px; }
    .filters { flex-direction: column; align-items: stretch; margin-bottom: 20px; }
    .sort { align-self: flex-end; }
    .documents__head { display: none; }
    .artifact-list a { grid-template-columns: 48px 1fr; gap: 4px 16px; padding: 16px; }
    .artifact-list .type { grid-row: span 2; width: 48px; height: 56px; }
    .artifact-list .date { grid-column: 2; font-size: 13px; }
    .artifact-list .open { display: none; }
    .title { font-size: 16px; line-height: 22px; }
    .details { gap: 2px; }
    .results span + span { display: none; }
    .artifact__header h1 { font-size: 24px; }
    .toolbar { width: 100%; }
    .toolbar .button { flex: 1; padding: 10px 16px; }
    .button__note { display: none; }
    .artifact-frame { height: calc(100dvh - 260px); min-height: 420px; }
    .prose { padding: 20px; }
    .login { padding: 32px 24px; }
    .site-header:not(:has(.site-nav)) { padding-bottom: 16px; }
    .login--welcome { padding-right: 24px; padding-bottom: 150px; }
    .login--welcome::after { --a: 110px; }
    .table { display: block; overflow-x: auto; }
}
