:root {
    --bg: #f4f7f5;
    --bg-strong: #e6efe9;
    --card: #ffffff;
    --line: #d9e2dd;
    --text: #17211c;
    --muted: #5d6b64;
    --accent: #11685f;
    --accent-soft: #dff1ed;
    --accent-2: #8b4e16;
    --blue: #235c97;
    --blue-soft: #e5eff8;
    --plum: #6d5079;
    --plum-soft: #f0e8f4;
    --warning: #8b5e00;
    --danger: #a53722;
    --shadow: 0 10px 30px rgba(24, 38, 32, 0.08);
    --radius: 8px;
    --font-ui: "Atkinson Hyperlegible", "Aptos", "Segoe UI", sans-serif;
    --font-display: "Atkinson Hyperlegible", "Aptos Display", "Segoe UI", sans-serif;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: var(--font-ui);
    color: var(--text);
    background:
        linear-gradient(90deg, rgba(17, 104, 95, 0.04) 1px, transparent 1px),
        linear-gradient(180deg, #fbfdfc 0%, var(--bg) 100%);
    background-size: 32px 32px, auto;
    overflow-wrap: anywhere;
}

a {
    color: var(--accent);
}

.shell {
    display: grid;
    grid-template-columns: minmax(280px, 340px) minmax(0, 1fr);
    min-height: 100vh;
}

.sidebar {
    position: sticky;
    top: 0;
    align-self: start;
    height: 100vh;
    padding: 22px;
    border-right: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(14px);
    overflow-y: auto;
}

.main {
    width: min(100%, 1120px);
    padding: 24px;
    margin: 0 auto;
}

.brand {
    padding-bottom: 18px;
    margin-bottom: 18px;
    border-bottom: 1px solid var(--line);
}

.eyebrow {
    margin: 0 0 8px;
    color: var(--accent-2);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 0.74rem;
    font-weight: 700;
}

.brand h1,
.content h1,
.editor-header h1,
.section-kicker h1,
.section-kicker h2 {
    margin: 0;
    font-family: var(--font-display);
    font-size: clamp(2rem, 4vw, 3rem);
    line-height: 1.05;
    letter-spacing: 0;
    font-weight: 800;
    overflow-wrap: normal;
}

.brand p,
.lead,
.muted,
.section-meta,
.login-note,
.status-note,
.focus-area-card span,
.focus-area-card small,
.path-card span,
.path-card small {
    color: var(--muted);
}

.sidebar-card,
.login-card,
.journey-panel,
.path-panel,
.hero,
.section-card,
.editor-card,
.notice {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.sidebar-card,
.login-card {
    padding: 16px;
    margin-bottom: 14px;
}

.quick-links,
.pill-row,
.stat-grid,
.section-grid,
.practice-list,
.actions,
.workflow-builder-grid,
.editor-toolbar,
.mode-switch,
.rich-toolbar,
.section-header-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.quick-link,
.filter-button,
.button,
.tag {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border-radius: 999px;
    text-decoration: none;
    border: 1px solid transparent;
    font-size: 0.95rem;
    font: inherit;
    line-height: 1.2;
}

.quick-link,
.tag {
    padding: 9px 12px;
    background: var(--accent-soft);
    color: var(--accent);
    cursor: pointer;
}

.tag-area-copilot,
.filter-button[data-filter="copilot"].is-active {
    background: var(--blue);
    border-color: var(--blue);
    color: #fff;
}

.tag-area-onenote,
.filter-button[data-filter="onenote"].is-active {
    background: var(--plum-soft);
    color: var(--plum);
    border-color: #d7c6df;
}

.tag-area-files,
.filter-button[data-filter="files"].is-active {
    background: #f7ecd8;
    color: var(--warning);
    border-color: #e9cf9f;
}

.tag-area-teams,
.filter-button[data-filter="teams"].is-active {
    background: var(--accent-soft);
    color: var(--accent);
    border-color: #b9d9d2;
}

.section-card[data-area="copilot"] .section-details[open] .section-summary {
    background: var(--blue-soft);
}

.section-card[data-area="onenote"] .section-details[open] .section-summary {
    background: #f7f0fa;
}

.section-card[data-area="files"] .section-details[open] .section-summary {
    background: #fbf5e9;
}

.section-card[data-area="teams"] .section-details[open] .section-summary {
    background: #f1f8f5;
}

.quick-link {
    justify-content: flex-start;
    width: 100%;
    border-radius: var(--radius);
    border-color: transparent;
    font-weight: 700;
    text-align: left;
}

.quick-links-compact {
    display: grid;
}

.button,
.filter-button {
    cursor: pointer;
    background: #fff;
    color: var(--text);
    border-color: var(--line);
    padding: 11px 14px;
    font-weight: 700;
}

.filter-button {
    min-height: 42px;
}

.button-primary {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
}

.button-secondary {
    background: rgba(255, 255, 255, 0.7);
}

.button-danger {
    background: #fff4f0;
    color: var(--danger);
    border-color: rgba(165, 55, 34, 0.18);
}

.button.is-active,
.filter-button.is-active[data-filter="all"] {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible,
summary:focus-visible {
    outline: 3px solid rgba(35, 92, 151, 0.28);
    outline-offset: 3px;
}

.notice {
    padding: 14px 16px;
    margin-bottom: 18px;
}

.notice strong {
    display: block;
    margin-bottom: 4px;
}

.notice-warning {
    border-color: rgba(141, 93, 0, 0.2);
    background: #fff6de;
}

.notice-success {
    border-color: rgba(14, 107, 98, 0.2);
    background: #eef9f5;
    transition: opacity 260ms ease, transform 260ms ease;
}

.notice-success.is-hiding {
    opacity: 0;
    transform: translateY(-8px);
}

.notice-danger {
    border-color: rgba(165, 55, 34, 0.2);
    background: #fff0eb;
}

.overview-list {
    display: grid;
    gap: 12px;
}

.overview-group {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #f8fbf9;
    padding: 10px 12px;
}

.overview-group summary {
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    font-weight: 700;
}

.overview-group summary span {
    display: inline-flex;
    min-width: 28px;
    justify-content: center;
    padding: 4px 8px;
    border-radius: 999px;
    background: var(--accent-soft);
    color: var(--accent);
    font-size: 0.82rem;
}

.overview-links {
    display: grid;
    gap: 8px;
    margin-top: 10px;
}

.overview-links button,
.mini-link {
    color: var(--text);
}

.overview-links button:hover,
.mini-link:hover {
    color: var(--accent);
}

.overview-links button {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 8px;
    align-items: start;
    width: 100%;
    min-height: 36px;
    padding: 8px 6px;
    border: 0;
    border-radius: var(--radius);
    background: transparent;
    cursor: pointer;
    font: inherit;
    text-align: left;
}

.overview-links button:hover,
.overview-links button:focus-visible {
    background: #eef6f4;
}

.login-card form,
.editor-card form {
    display: grid;
    gap: 12px;
}

label {
    display: grid;
    gap: 6px;
    font-size: 0.95rem;
    font-weight: 600;
}

input,
textarea,
select {
    width: 100%;
    border-radius: var(--radius);
    border: 1px solid var(--line);
    padding: 12px 14px;
    font: inherit;
    color: var(--text);
    background: rgba(255, 255, 255, 0.88);
}

textarea {
    min-height: 65vh;
    resize: vertical;
    line-height: 1.55;
}

input:focus,
textarea:focus,
.wysiwyg-area:focus {
    outline: 2px solid rgba(14, 107, 98, 0.18);
    border-color: var(--accent);
}

.hero,
.editor-card {
    position: relative;
    overflow: hidden;
    padding: 24px;
    margin-bottom: 18px;
}

.hero::after,
.editor-card::after {
    display: none;
}

.hero-grid,
.editor-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.65fr) minmax(260px, 0.85fr);
    gap: 18px;
    align-items: start;
}

.hero-sidecard,
.editor-tips {
    padding: 18px;
    border-radius: var(--radius);
    background: #eef6f4;
    border: 1px solid #cfe3df;
}

.editor-tips ul {
    margin: 10px 0 0;
    padding-left: 20px;
}

.search-wrap {
    margin: 20px 0 14px;
}

.search-wrap input {
    background: rgba(255, 255, 255, 0.94);
}

.stat-grid {
    margin-top: 18px;
}

.filter-status {
    margin-top: 12px;
    padding: 12px 14px;
    border-radius: var(--radius);
    background: #eef6f4;
    border: 1px solid #cfe3df;
    color: var(--accent);
    font-weight: 800;
}

.stat {
    min-width: 120px;
    padding: 12px 14px;
    border-radius: var(--radius);
    background: #f8fbf9;
    border: 1px solid var(--line);
}

.stat strong {
    display: block;
    font-size: 1.25rem;
    font-family: var(--font-display);
}

.journey-panel {
    padding: 24px;
    margin-bottom: 18px;
}

.path-panel {
    padding: 24px;
    margin-bottom: 18px;
}

.section-kicker {
    max-width: 900px;
    margin-bottom: 18px;
}

.focus-area-grid,
.path-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 12px;
}

.focus-area-card,
.path-card {
    position: relative;
    display: grid;
    gap: 10px;
    padding: 18px;
    border-radius: var(--radius);
    text-decoration: none;
    background: #fff;
    border: 1px solid var(--line);
    box-shadow: 0 10px 24px rgba(20, 42, 38, 0.04);
    transition: background 140ms ease, border-color 140ms ease, transform 140ms ease;
    width: 100%;
    text-align: left;
    cursor: pointer;
    font: inherit;
}

.focus-area-card:hover,
.focus-area-card:focus,
.path-card:hover,
.path-card:focus {
    background: #f4faf8;
    border-color: #96c7be;
    transform: translateY(-1px);
}

.focus-area-card strong,
.path-card strong {
    color: var(--text);
    line-height: 1.18;
}

.focus-area-card::after,
.path-card::after {
    content: "Öffnen →";
    justify-self: start;
    width: fit-content;
    padding: 7px 10px;
    border-radius: 999px;
    background: #e2f2ef;
    color: var(--accent);
    font-weight: 800;
    font-size: 0.88rem;
}

.journey-action {
    width: fit-content;
    padding: 5px 9px;
    border-radius: 999px;
    background: #fff7e7;
    color: #7a4b00;
    font-size: 0.78rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.focus-area-card[data-area="copilot"] {
    border-color: #cddcf0;
}

.focus-area-card[data-area="onenote"] {
    border-color: #ded0e5;
}

.focus-area-card[data-area="files"] {
    border-color: #ead8b2;
}

.path-steps {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.path-steps span,
.section-type {
    display: inline-flex;
    align-items: center;
    padding: 5px 9px;
    border-radius: 999px;
    background: #f2f4f3;
    color: var(--muted);
    font-size: 0.82rem;
    font-weight: 700;
}

.section-grid {
    align-items: stretch;
    display: grid;
    gap: 12px;
}

.section-card {
    padding: 0;
    scroll-margin-top: 28px;
    width: 100%;
    box-shadow: none;
}

.section-card[data-hidden="true"] {
    display: none;
}

.section-card.is-highlighted {
    border-color: rgba(14, 107, 98, 0.4);
    box-shadow: 0 0 0 4px rgba(14, 107, 98, 0.08), var(--shadow);
}

.section-card h2 {
    margin-top: 0;
    font-size: 1.22rem;
    line-height: 1.25;
    overflow-wrap: anywhere;
}

.section-card h3 {
    margin-bottom: 8px;
    font-size: 1.05rem;
}

.section-header {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: start;
}

.section-details {
    display: grid;
    gap: 0;
}

.section-summary {
    display: flex;
    justify-content: space-between;
    align-items: start;
    gap: 16px;
    cursor: pointer;
    list-style: none;
    padding: 18px;
    scroll-margin-top: 28px;
}

.section-summary::-webkit-details-marker {
    display: none;
}

.section-summary h2 {
    margin-bottom: 0;
}

.section-summary-copy {
    display: grid;
    gap: 8px;
}

.section-details[open] .section-summary {
    border-bottom: 1px solid var(--line);
    background: #f8fbf9;
}

.floating-nav {
    position: sticky;
    bottom: 14px;
    z-index: 15;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 20px 0 8px;
    padding: 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.94);
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
    backdrop-filter: blur(8px);
}

.floating-nav a,
.floating-nav button {
    display: inline-flex;
    align-items: center;
    padding: 9px 12px;
    border-radius: 999px;
    background: #f0f6f4;
    color: var(--text);
    text-decoration: none;
    font-weight: 700;
    border: 0;
    cursor: pointer;
    font: inherit;
}

.section-header a {
    color: inherit;
    text-decoration: none;
}

.section-meta {
    margin: 0;
    font-size: 0.94rem;
    max-width: 68ch;
}

.rendered-content {
    display: grid;
    gap: 14px;
    line-height: 1.6;
    padding: 18px;
    max-width: 82ch;
}

.mini-link {
    font-size: 0.92rem;
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    padding: 6px 10px;
    border-radius: 999px;
    background: #f4f7f5;
    text-decoration: none;
}

.rendered-content p,
.rendered-content ul,
.rendered-content ol,
.rendered-content blockquote,
.rendered-content table,
.rendered-content .code-block {
    margin: 0;
}

.rendered-content ul,
.rendered-content ol {
    padding-left: 22px;
}

.rendered-content blockquote {
    padding: 14px 16px;
    border-left: 4px solid var(--accent);
    border-radius: 0 var(--radius) var(--radius) 0;
    background: #eef6f4;
}

.rendered-content code,
.wysiwyg-area code,
textarea {
    font-family: "SFMono-Regular", Consolas, monospace;
    font-size: 0.95em;
}

.code-block {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius);
    background: #18221d;
    color: #f4fbf7;
}

.code-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 14px 0;
}

.code-label {
    color: rgba(255, 255, 255, 0.68);
    font-size: 0.78rem;
    letter-spacing: 0.08em;
}

.copy-button {
    border: none;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    border-radius: 10px;
    width: 34px;
    height: 34px;
    font-size: 1rem;
    cursor: pointer;
}

.copy-button.is-copied {
    background: rgba(14, 107, 98, 0.45);
}

.rendered-content pre {
    margin: 0;
    overflow-x: auto;
    padding: 12px 16px 16px;
    color: inherit;
    background: transparent;
}

.rendered-content table {
    width: 100%;
    border-collapse: collapse;
    overflow: hidden;
    border-radius: var(--radius);
    background: #fff;
    border: 1px solid var(--line);
}

.rendered-content th,
.rendered-content td {
    padding: 11px 12px;
    border-bottom: 1px solid rgba(89, 66, 31, 0.12);
    text-align: left;
    vertical-align: top;
}

.practice-box {
    margin-top: 18px;
    padding: 16px;
    border-radius: var(--radius);
    background: #eef6f4;
    border: 1px solid #cfe3df;
}

.practice-list {
    flex-direction: column;
    gap: 8px;
    margin-top: 12px;
}

.practice-list label {
    grid-template-columns: auto 1fr;
    align-items: start;
    gap: 10px;
    font-weight: 500;
}

.practice-list input {
    width: auto;
    margin-top: 3px;
}

.editor-toolbar {
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.editor-panels {
    display: grid;
    gap: 16px;
}

.editor-panel.is-hidden {
    display: none;
}

.wysiwyg-frame {
    border-radius: var(--radius);
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.9);
    overflow: hidden;
}

.wysiwyg-area {
    min-height: 65vh;
    padding: 18px;
    line-height: 1.6;
    overflow: auto;
}

.wysiwyg-area h1,
.wysiwyg-area h2,
.wysiwyg-area h3 {
    font-family: var(--font-display);
}

.wysiwyg-area h1 {
    margin-top: 0;
    padding-top: 18px;
    border-top: 1px dashed rgba(89, 66, 31, 0.18);
}

.wysiwyg-area h1:first-child,
.wysiwyg-area .editor-section:first-child h1 {
    border-top: none;
    padding-top: 0;
}

.wysiwyg-area .editor-section {
    margin-bottom: 28px;
}

.workflow-builder {
    margin-top: 6px;
    padding: 18px;
    border-radius: var(--radius);
    background: #f7f2ea;
    border: 1px solid #e6d7c3;
}

.workflow-builder h2 {
    margin: 0 0 8px;
}

.workflow-builder-grid {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(140px, 1fr) auto;
    gap: 12px;
    align-items: end;
}

.revision-history {
    margin-top: 22px;
    padding: 18px;
    border-radius: var(--radius);
    border: 1px solid #d8e5df;
    background: #f8fbf9;
}

.danger-zone,
.trash-list {
    margin-top: 22px;
    padding: 18px;
    border-radius: var(--radius);
    border: 1px solid #ead5ce;
    background: #fff8f5;
}

.danger-zone {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
}

.danger-zone h2,
.trash-list h2 {
    margin: 0 0 6px;
}

.danger-zone form {
    flex: 0 0 auto;
}

.revision-history-header,
.revision-item-head {
    display: flex;
    justify-content: space-between;
    align-items: start;
    gap: 14px;
}

.revision-history h2 {
    margin: 0;
}

.revision-list {
    display: grid;
    gap: 12px;
    margin-top: 14px;
}

.revision-item {
    padding: 14px;
    border-radius: var(--radius);
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.78);
}

.revision-item-head span {
    flex: 0 0 auto;
    color: var(--muted);
    font-size: 0.9rem;
}

.revision-preview {
    margin-top: 10px;
}

.revision-preview ul {
    margin: 6px 0 0;
    padding-left: 20px;
}

.revision-preview li {
    margin-bottom: 4px;
    color: var(--muted);
}

.section-edit-footer {
    padding: 0 18px 18px;
}

.mini-edit-button {
    width: fit-content;
}

.trash-list {
    border-color: #d8e5df;
    background: #f8fbf9;
}

.trash-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 14px;
    margin-top: 12px;
    padding: 14px;
    border-radius: var(--radius);
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.8);
}

.footer {
    padding: 22px 0 8px;
    color: var(--muted);
    font-size: 0.92rem;
}

@media (max-width: 980px) {
    .shell {
        grid-template-columns: 1fr;
    }

    .sidebar {
        position: static;
        height: auto;
        border-right: none;
        border-bottom: 1px solid var(--line);
        padding-bottom: 14px;
    }

    .hero-grid,
    .editor-grid,
    .workflow-builder-grid {
        grid-template-columns: 1fr;
    }

    .quick-links {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .editor-toolbar {
        align-items: start;
        flex-direction: column;
    }
}

@media (max-width: 640px) {
    .main,
    .sidebar {
        padding: 14px;
    }

    .hero,
    .editor-card {
        padding: 16px;
    }

    .brand h1,
    .content h1,
    .editor-header h1 {
        font-size: 2rem;
    }

    .section-header,
    .section-summary,
    .danger-zone,
    .trash-item {
        flex-direction: column;
        align-items: stretch;
    }

    .quick-links,
    .focus-area-grid,
    .path-grid,
    .stat-grid {
        grid-template-columns: 1fr;
    }

    .quick-link,
    .focus-area-card,
    .path-card,
    .filter-button,
    .button {
        min-height: 46px;
    }

    .pill-row {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .filter-button {
        justify-content: center;
        padding-inline: 10px;
    }

    .section-summary {
        padding: 16px;
        scroll-margin-top: 18px;
    }

    .section-card {
        scroll-margin-top: 18px;
    }

    .section-header-actions {
        width: 100%;
        justify-content: space-between;
    }

    .rendered-content {
        padding: 16px;
    }
}
