/* ============================================================
   TRSuite Downloads - eigenstaendiges Stylesheet
   Wird NICHT mit assets/css/main.css kombiniert; die Seite bringt
   ihr komplettes Layout selbst mit.
   Erzeugt aus releases.json von homepage/tools/DownloadsPageGenerator.java
   ============================================================ */

:root {
    --ink:        #14181f;   /* Fliesstext            */
    --ink-soft:   #5a6472;   /* Sekundaertext         */
    --ink-faint:  #8b95a3;
    --line:       #e4e7ec;
    --bg:         #f5f7fa;
    --card:       #ffffff;
    --brand:      #b84752;   /* Rot der Marke         */
    --action:     #2a5d9f;   /* Primaeraktion         */
    --action-dk:  #1f4a80;
    --dark:       #171c25;   /* Kopf-/Fussbereich     */
    --ok:         #1f7a4d;
    --radius:     10px;
    --shadow:     0 1px 2px rgba(20, 24, 31, .05), 0 8px 24px -12px rgba(20, 24, 31, .18);
}

*, *::before, *::after { box-sizing: border-box; }

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

body {
    margin: 0;
    background: var(--bg);
    color: var(--ink);
    font: 16px/1.6 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
          "Helvetica Neue", Arial, sans-serif;
}

a { color: var(--action); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3 { line-height: 1.2; margin: 0 0 .4em; font-weight: 650; letter-spacing: -.01em; }
h1 { font-size: 2.4rem; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.05rem; }

.wrap { width: 100%; max-width: 1080px; margin: 0 auto; padding: 0 24px; }
.wrap-narrow { max-width: 720px; }

/* ---------- Kopfbereich ---------- */

.site-header {
    background: var(--dark);
    position: sticky;
    top: 0;
    z-index: 20;
}

.site-header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    min-height: 60px;
    flex-wrap: wrap;
}

.brand { display: inline-flex; align-items: center; gap: .6rem; color: #fff; }
.brand:hover { text-decoration: none; }

.brand-mark {
    display: grid;
    place-items: center;
    width: 30px; height: 30px;
    border-radius: 7px;
    background: var(--brand);
    color: #fff;
    font-size: .78rem;
    font-weight: 800;
    letter-spacing: .02em;
}

.brand-name { font-weight: 650; letter-spacing: .01em; }

.site-nav { display: flex; flex-wrap: wrap; gap: 1.25rem; }

.site-nav a {
    color: #c3cad6;
    font-size: .88rem;
    padding: .35rem 0;
    border-bottom: 2px solid transparent;
}

.site-nav a:hover { color: #fff; text-decoration: none; border-bottom-color: var(--brand); }

/* ---------- Hero ---------- */

.hero {
    background: linear-gradient(180deg, var(--dark) 0%, #1e2531 100%);
    color: #fff;
    padding: 3.5rem 0 3rem;
}

.eyebrow {
    margin: 0 0 .5rem;
    font-size: .75rem;
    font-weight: 700;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: #9fb0c9;
}

.hero h1 { color: #fff; margin-bottom: .3em; }

.lead {
    max-width: 62ch;
    font-size: 1.05rem;
    color: #c8d1de;
    margin: 0 0 1.2rem;
}

.hero-contact { font-size: .88rem; color: #9aa5b4; margin: 0; }
.hero-contact a { color: #cfe0f5; }

/* ---------- Abschnitte ---------- */

.section { padding: 2.75rem 0; }
.section + .section { padding-top: .5rem; }
.section-lead { color: var(--ink-soft); margin: -.2rem 0 1.4rem; }

.section-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}

.section-head h2 { margin: 0; }

.pill {
    display: inline-block;
    padding: .18em .7em;
    border-radius: 999px;
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.pill-current { background: rgba(31, 122, 77, .12); color: var(--ok); }
.pill-version { background: #eef1f6; color: var(--ink-soft); }

/* ---------- Aktuelles Release ---------- */

.release-card {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    margin-top: -3.5rem;   /* ragt in den Hero hinein */
    position: relative;
    z-index: 5;
}

.release-head {
    padding: 1.4rem 1.6rem 1.1rem;
    border-bottom: 1px solid var(--line);
}

.release-title {
    display: flex;
    align-items: center;
    gap: .7rem;
    flex-wrap: wrap;
    margin-bottom: .35rem;
}

.release-title h2 { margin: 0; font-size: 1.6rem; }

.release-facts {
    display: flex;
    flex-wrap: wrap;
    gap: .4rem 1.4rem;
    font-size: .85rem;
    color: var(--ink-soft);
    margin: 0;
}

.release-facts b { font-weight: 600; color: var(--ink); }

/* ---------- Artefakt-Zeile ---------- */

.artifacts { margin: 0; padding: 0; list-style: none; }

.artifact {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: .5rem 1.5rem;
    align-items: center;
    padding: 1rem 1.6rem;
    border-bottom: 1px solid var(--line);
}

.artifact:last-child { border-bottom: 0; }
.artifact:hover { background: #fbfcfd; }

.artifact-main { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; }
.artifact-name { font-weight: 600; }

.chip {
    display: inline-block;
    padding: .1em .5em;
    border: 1px solid var(--line);
    border-radius: 5px;
    background: #f7f9fb;
    font-size: .68rem;
    font-weight: 700;
    letter-spacing: .04em;
    color: var(--ink-soft);
}

.artifact-size { color: var(--ink-faint); font-size: .85rem; }

.artifact-hash {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    gap: .5rem;
    flex-wrap: wrap;
    font-size: .76rem;
    color: var(--ink-faint);
}

.artifact-hash code {
    font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
    font-size: .95em;
    color: var(--ink-soft);
    background: #f4f6f9;
    border: 1px solid var(--line);
    border-radius: 5px;
    padding: .15em .45em;
    word-break: break-all;
}

.copy {
    border: 1px solid var(--line);
    background: #fff;
    border-radius: 5px;
    padding: .18em .5em;
    font-size: .72rem;
    color: var(--ink-soft);
    cursor: pointer;
    line-height: 1.4;
}

.copy:hover { border-color: var(--action); color: var(--action); }
.copy.done { background: var(--ok); border-color: var(--ok); color: #fff; }

/* ---------- Buttons ---------- */

.btn {
    display: inline-block;
    border: 1px solid transparent;
    border-radius: 7px;
    padding: .6rem 1.3rem;
    font: inherit;
    font-size: .9rem;
    font-weight: 600;
    cursor: pointer;
    text-align: center;
    white-space: nowrap;
}

.btn-primary { background: var(--action); color: #fff; }
.btn-primary:hover { background: var(--action-dk); color: #fff; text-decoration: none; }

.btn-quiet { background: #fff; border-color: var(--line); color: var(--ink); }
.btn-quiet:hover { border-color: var(--action); color: var(--action); text-decoration: none; }

.btn-ghost { background: transparent; border-color: var(--line); color: var(--ink-soft); }
.btn-ghost:hover { color: var(--ink); }

/* ---------- Ressourcen-Leiste ---------- */

.resources {
    display: flex;
    flex-wrap: wrap;
    gap: 1.25rem;
    padding: .9rem 1.6rem;
    background: #fafbfc;
    border-top: 1px solid var(--line);
    font-size: .85rem;
}

/* ---------- Segmentierte Navigation ---------- */

.tabs {
    display: flex;
    flex-wrap: wrap;
    gap: .4rem;
    margin: 2.25rem 0 1.25rem;
}

.tab {
    border: 1px solid var(--line);
    background: #fff;
    border-radius: 999px;
    padding: .4rem 1rem;
    font: inherit;
    font-size: .85rem;
    color: var(--ink-soft);
    cursor: pointer;
}

.tab:hover { border-color: var(--action); color: var(--action); }
.tab[aria-selected="true"] { background: var(--action); border-color: var(--action); color: #fff; }

/* ---------- Karten-Raster ---------- */

.card {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    margin-bottom: 1.25rem;
    overflow: hidden;
}

.card-head {
    display: flex;
    align-items: baseline;
    gap: .7rem;
    flex-wrap: wrap;
    padding: 1rem 1.6rem;
    border-bottom: 1px solid var(--line);
    background: #fcfdfe;
}

.card-head h3 { margin: 0; }

.doc-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 0;
    margin: 0;
    padding: 0;
    list-style: none;
}

.doc-grid li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .8rem;
    padding: .8rem 1.6rem;
    border-bottom: 1px solid var(--line);
    font-size: .92rem;
}

/* ---------- Frühere Versionen ---------- */

.archive { border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); margin-bottom: .6rem; }

.archive > summary {
    display: flex;
    align-items: baseline;
    gap: .7rem;
    flex-wrap: wrap;
    padding: .9rem 1.4rem;
    cursor: pointer;
    font-weight: 600;
}

.archive > summary::marker { color: var(--ink-faint); }
.archive > summary:hover { background: #fafbfc; }
.archive[open] > summary { border-bottom: 1px solid var(--line); }
.archive-date { font-weight: 400; font-size: .85rem; color: var(--ink-faint); }

/* ---------- Hinweise ---------- */

.notice {
    border-radius: 8px;
    padding: .85rem 1.1rem;
    font-size: .9rem;
    margin-top: 1rem;
}

.notice-ok  { background: rgba(31, 122, 77, .1);  color: #14603a; }
.notice-err { background: rgba(184, 71, 82, .1);  color: #8d323c; }

.empty {
    padding: 2rem;
    text-align: center;
    color: var(--ink-faint);
    border: 1px dashed var(--line);
    border-radius: var(--radius);
}

/* ---------- Formular ---------- */

.form { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.5rem; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.field { margin-bottom: 1rem; }
.field label { display: block; font-size: .85rem; font-weight: 600; margin-bottom: .3rem; }
.req { color: var(--brand); }

.field input, .field select, .field textarea {
    width: 100%;
    padding: .6rem .75rem;
    border: 1px solid var(--line);
    border-radius: 7px;
    font: inherit;
    font-size: .92rem;
    background: #fff;
    color: var(--ink);
}

.field input:focus, .field select:focus, .field textarea:focus {
    outline: 2px solid rgba(42, 93, 159, .35);
    outline-offset: 1px;
    border-color: var(--action);
}

.form-actions { display: flex; gap: .6rem; }
.antispam { position: absolute; left: -9999px; }

/* ---------- Fussbereich ---------- */

.site-footer { background: var(--dark); color: #9aa5b4; margin-top: 3rem; padding: 2.5rem 0 1.5rem; font-size: .9rem; }
.site-footer-inner { display: flex; justify-content: space-between; gap: 2rem; flex-wrap: wrap; }
.footer-claim { color: #fff; font-weight: 650; margin: 0 0 .4rem; }
.footer-vision { max-width: 46ch; margin: 0; }
.footer-links { display: flex; flex-direction: column; gap: .45rem; }
.footer-links a { color: #c3cad6; }
.copyright { margin-top: 2rem; padding-top: 1.2rem; border-top: 1px solid #262d39; font-size: .8rem; color: #6d7889; }

/* ---------- Mobil ---------- */

@media (max-width: 720px) {
    h1 { font-size: 1.9rem; }
    .hero { padding: 2.5rem 0; }
    .release-card { margin-top: -2rem; }
    .release-head, .artifact, .resources, .card-head, .doc-grid li { padding-left: 1.1rem; padding-right: 1.1rem; }
    .artifact { grid-template-columns: 1fr; }
    .artifact-size { order: 3; }
    .artifact .btn { width: 100%; }
    .field-row { grid-template-columns: 1fr; gap: 0; }
    .site-nav { gap: .9rem; }
}

@media (prefers-reduced-motion: no-preference) {
    .copy, .btn, .tab, .site-nav a { transition: background-color .15s, color .15s, border-color .15s; }
}
