/* Colors and type follow the app (PortfolioPerformanceCalculator.Ui/Assets/app.css); dark mode is the page's own. */
:root {
    --bg: #f6f7f9;
    --surface: #ffffff;
    --text: #1d2330;
    --muted: #5c6577;
    --border: #dfe3ea;
    --positive: #1a7f4b;
    --negative: #b42318;
    --accent: #2457c5;
    --accent-text: #ffffff;
    --dark: #1d2330;
    --dark-text: #ffffff;
    --banner-bg: #fff4ce;
    --banner-border: #e0b200;
    --shadow: 0 1px 2px rgba(29, 35, 48, 0.06), 0 8px 24px rgba(29, 35, 48, 0.08);
    color-scheme: light;
}

@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
        --bg: #12151c;
        --surface: #1b1f29;
        --text: #e6e9ef;
        --muted: #9aa3b5;
        --border: #2c3240;
        --positive: #4cc38a;
        --negative: #f07167;
        --accent: #7aa2ff;
        --accent-text: #0f1420;
        --dark: #e6e9ef;
        --dark-text: #12151c;
        --banner-bg: #3a3112;
        --banner-border: #b38f00;
        --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 8px 24px rgba(0, 0, 0, 0.35);
        color-scheme: dark;
    }
}

:root[data-theme="dark"] {
    --bg: #12151c;
    --surface: #1b1f29;
    --text: #e6e9ef;
    --muted: #9aa3b5;
    --border: #2c3240;
    --positive: #4cc38a;
    --negative: #f07167;
    --accent: #7aa2ff;
    --accent-text: #0f1420;
    --dark: #e6e9ef;
    --dark-text: #12151c;
    --banner-bg: #3a3112;
    --banner-border: #b38f00;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 8px 24px rgba(0, 0, 0, 0.35);
    color-scheme: dark;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
    font-size: 17px;
    line-height: 1.6;
}

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

img {
    max-width: 100%;
    display: block;
}

.wrap {
    max-width: 1120px;
    margin: 0 auto;
    padding: 0 16px;
}

@media (min-width: 720px) {
    .wrap {
        padding: 0 32px;
    }
}

/* Navigation */

.nav {
    position: sticky;
    top: 0;
    z-index: 10;
    background: color-mix(in srgb, var(--bg) 88%, transparent);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--border);
}

.nav .wrap {
    display: flex;
    align-items: center;
    gap: 24px;
    min-height: 56px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
    color: var(--text);
    text-decoration: none;
    white-space: nowrap;
}

.nav ul {
    display: none;
    gap: 20px;
    margin: 0 0 0 auto;
    padding: 0;
    list-style: none;
    font-size: 0.95rem;
}

.nav ul a {
    color: var(--muted);
    text-decoration: none;
}

.nav ul a:hover {
    color: var(--text);
}

@media (min-width: 820px) {
    .nav ul {
        display: flex;
    }
}

/* Buttons */

.button {
    display: inline-block;
    padding: 12px 22px;
    border-radius: 999px;
    font-weight: 600;
    text-decoration: none;
    border: 1px solid var(--border);
    color: var(--text);
    background: var(--surface);
}

.button.primary {
    background: var(--dark);
    border-color: var(--dark);
    color: var(--dark-text);
}

/* Hero */

.hero {
    padding: 56px 0 24px;
    text-align: center;
}

.eyebrow {
    margin: 0 0 12px;
    color: var(--muted);
    font-size: 0.9rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.hero h1 {
    margin: 0 auto;
    max-width: 18em;
    font-size: clamp(2rem, 5vw, 3.2rem);
    line-height: 1.15;
}

.hero .lead {
    margin: 20px auto 0;
    max-width: 38em;
    color: var(--muted);
    font-size: 1.15rem;
}

.actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
    margin-top: 28px;
}

.download-info {
    margin: 14px auto 0;
    max-width: 40rem;
    color: var(--muted);
    font-size: 0.9rem;
}

/* The version line is the toggle; checksum and check command stay folded away until asked for. */
.download-info summary {
    display: block;
    cursor: pointer;
    list-style: none;
}

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

.download-info .toggle {
    color: var(--accent);
    text-decoration: underline;
}

.verify {
    margin-top: 16px;
    padding: 16px 20px;
    text-align: left;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
}

.verify-item + .verify-item {
    margin-top: 14px;
}

.verify-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 6px;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

/* 64 hex digits and a long path: wrap on a phone instead of scrolling the page sideways. */
.verify code {
    display: block;
    padding: 8px 12px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text);
    font-size: 0.85rem;
    line-height: 1.5;
    overflow-wrap: anywhere;
}

.verify .copy {
    padding: 0;
    border: none;
    background: none;
    color: var(--accent);
    font: inherit;
    letter-spacing: normal;
    text-transform: none;
    cursor: pointer;
}

.verify .copy:hover {
    text-decoration: underline;
}

.verify-note {
    margin: 12px 0 0;
}

.shot {
    margin: 40px 0 0;
}

.shot img {
    height: auto;
    margin: 0 auto;
    border: 1px solid var(--border);
    border-radius: 10px;
    box-shadow: var(--shadow);
}

.shot figcaption {
    margin-top: 10px;
    color: var(--muted);
    font-size: 0.9rem;
    text-align: center;
}

/* Sections */

section {
    padding: 64px 0;
}

section + section {
    border-top: 1px solid var(--border);
}

h2 {
    margin: 0 0 8px;
    font-size: clamp(1.6rem, 3.5vw, 2.2rem);
    line-height: 1.2;
}

h3 {
    margin: 0 0 6px;
    font-size: 1.15rem;
}

.section-lead {
    margin: 0 0 32px;
    max-width: 42em;
    color: var(--muted);
}

.grid {
    display: grid;
    gap: 16px;
    grid-template-columns: 1fr;
}

@media (min-width: 720px) {
    .grid.two {
        grid-template-columns: repeat(2, 1fr);
    }

    .grid.three {
        grid-template-columns: repeat(3, 1fr);
    }
}

.card {
    padding: 22px 24px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 10px;
}

.card p {
    margin: 0;
    color: var(--muted);
}

.card p + p {
    margin-top: 10px;
}

.tech {
    font-size: 0.85rem;
}

.split {
    display: grid;
    gap: 32px;
    align-items: center;
    margin-top: 48px;
}

@media (min-width: 900px) {
    .split {
        grid-template-columns: 2fr 3fr;
    }
}

.split h3 {
    font-size: 1.35rem;
}

.split p {
    color: var(--muted);
}

/* Steps */

.steps {
    counter-reset: step;
    display: grid;
    gap: 16px;
    margin: 0;
    padding: 0;
    list-style: none;
}

@media (min-width: 720px) {
    .steps {
        grid-template-columns: repeat(3, 1fr);
    }
}

.steps li {
    counter-increment: step;
}

.steps li::before {
    content: counter(step);
    display: inline-grid;
    place-items: center;
    width: 32px;
    height: 32px;
    margin-bottom: 12px;
    border-radius: 50%;
    background: var(--dark);
    color: var(--dark-text);
    font-weight: 700;
}

/* flatex-Import */

.feature {
    background: var(--surface);
}

.feature .eyebrow {
    color: var(--accent);
    font-weight: 600;
}

.feature .card {
    background: var(--bg);
}

.note {
    margin: 24px 0 0;
    color: var(--muted);
}

.modes {
    margin-top: 32px;
}

.mode-tag {
    display: inline-block;
    margin-bottom: 8px;
    padding: 2px 10px;
    border-radius: 999px;
    border: 1px solid var(--border);
    color: var(--muted);
    font-size: 0.8rem;
}

/* Security */

.promise {
    margin: 0 0 32px;
    padding: 18px 22px;
    border-left: 4px solid var(--positive);
    background: var(--surface);
    border-radius: 0 10px 10px 0;
    font-weight: 600;
}

.flow {
    margin: 0 0 40px;
    padding: 20px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 10px;
    overflow-x: auto;
}

.flow svg {
    display: block;
    width: 100%;
    height: auto;
}

.flow svg.wide {
    min-width: 560px;
}

.flow svg.narrow {
    display: none;
    max-width: 420px;
    margin: 0 auto;
}

@media (max-width: 640px) {
    .flow {
        padding: 12px;
    }

    .flow svg.wide {
        display: none;
    }

    .flow svg.narrow {
        display: block;
    }
}

.flow svg text {
    fill: var(--text);
    font-family: inherit;
}

.flow svg .muted {
    fill: var(--muted);
}

.flow svg .box {
    fill: var(--bg);
    stroke: var(--border);
}

.flow svg .local {
    fill: none;
    stroke: var(--positive);
    stroke-dasharray: 6 4;
}

.flow svg .local-label {
    fill: var(--positive);
    font-weight: 600;
}

.flow svg .line {
    stroke: var(--muted);
    fill: none;
}

.flow svg .arrow {
    fill: var(--muted);
}

.table-wrap {
    overflow-x: auto;
    margin: 0 0 40px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 10px;
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95rem;
}

th,
td {
    padding: 12px 16px;
    text-align: left;
    vertical-align: top;
    border-bottom: 1px solid var(--border);
}

th {
    color: var(--muted);
    font-size: 0.85rem;
    font-weight: 600;
}

tr:last-child td {
    border-bottom: 0;
}

td:first-child {
    font-weight: 600;
    white-space: nowrap;
}

/* FAQ */

details {
    padding: 16px 0;
    border-bottom: 1px solid var(--border);
}

summary {
    cursor: pointer;
    font-weight: 600;
}

details p {
    margin: 10px 0 0;
    color: var(--muted);
    max-width: 46em;
}

/* Footer */

footer {
    padding: 40px 0 56px;
    border-top: 1px solid var(--border);
    color: var(--muted);
    font-size: 0.9rem;
}

footer .wrap {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 24px;
    justify-content: space-between;
}

footer .disclosure {
    flex-basis: 100%;
}

/* Datenschutz page */

.legal h3 {
    margin-top: 28px;
}

.legal p {
    max-width: 46em;
}

@media (max-width: 640px) {
    thead {
        display: none;
    }

    tr,
    td {
        display: block;
    }

    tr {
        padding: 14px 16px;
        border-bottom: 1px solid var(--border);
    }

    tr:last-child {
        border-bottom: 0;
    }

    td {
        padding: 2px 0;
        border: 0;
    }

    td[data-label]::before {
        content: attr(data-label) ": ";
        color: var(--muted);
        font-weight: 600;
    }
}

/* Scroll fade-in (assets/reveal.js): only on screen, only while the script runs and motion is welcome. */
@media screen and (prefers-reduced-motion: no-preference) {
    .reveal-on .reveal {
        opacity: 0;
        transform: translateY(12px);
        transition: opacity 0.6s ease-out, transform 0.6s ease-out;
        transition-delay: var(--reveal-delay, 0ms);
    }

    .reveal-on .reveal.revealed {
        opacity: 1;
        transform: none;
    }
}
