/* ---- FARBFÄCHER (Infoseite, im Stil von Impressum/Datenschutz) ---- */

.ff-page { margin-bottom: 6rem; }
.legal-box.ff-box { max-width: 1200px; padding: 3.5rem 4rem; }
.ff-intro { font-size: 1.1rem; line-height: 1.7; color: var(--text-gr); margin: 0 0 1rem; max-width: 760px; }
.ff-hint { font-size: 0.95rem; line-height: 1.6; color: var(--text-gr); margin: 0 0 2rem; padding: 0.9rem 1.1rem; border-left: 4px solid var(--primary); background: rgba(30, 79, 158, 0.05); border-radius: 0 8px 8px 0; max-width: 760px; }
.ff-empty { font-size: 1.05rem; color: var(--text-gr); }

/* Suche und Filter */
.ff-tools { display: flex; flex-wrap: wrap; gap: 1rem 1.5rem; align-items: center; margin-bottom: 1.2rem; }
.ff-search { flex: 1 1 280px; max-width: 420px; padding: 0.8rem 1rem; border: 1px solid rgba(30, 79, 158, 0.18); border-radius: 10px; font: inherit; font-size: 1rem; background: #ffffff; }
.ff-search:focus { outline: 2px solid var(--primary); outline-offset: 1px; }
.ff-filter { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; color: var(--text-gr); font-size: 0.95rem; }
.ff-chip { padding: 0.45rem 0.9rem; border: 1px solid rgba(30, 79, 158, 0.25); border-radius: 999px; background: #ffffff; color: var(--primary); font: inherit; font-size: 0.9rem; font-weight: 600; cursor: pointer; }
.ff-chip[aria-pressed="true"] { background: var(--primary); border-color: var(--primary); color: #ffffff; }

/* Sprungmarken zu den Fächern */
.ff-jump { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 2.5rem; }
.ff-jump a { padding: 0.4rem 0.85rem; border-radius: 8px; background: rgba(30, 79, 158, 0.07); color: var(--primary); font-size: 0.92rem; font-weight: 600; text-decoration: none; }
.ff-jump a:hover { background: rgba(30, 79, 158, 0.14); }

/* Ein Fächer */
.ff-fan { margin-top: 2.5rem; scroll-margin-top: 110px; }
.ff-fan-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.3rem 1rem; padding-bottom: 0.6rem; margin-bottom: 1.2rem; border-bottom: 2px solid rgba(30, 79, 158, 0.1); }
.ff-fan-head h2 { margin: 0; font-size: 1.5rem; color: var(--primary); }
.ff-fan-head p { margin: 0; color: var(--text-gr); font-size: 0.95rem; }
.ff-count { margin-left: auto; color: var(--text-gr); font-size: 0.9rem; }

.ff-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 1rem; margin: 0; padding: 0; list-style: none; }
.ff-c { display: flex; flex-direction: column; gap: 0.2rem; min-width: 0; padding: 0.6rem 0.6rem 0.7rem; background: #f6f8fb; border: 1px solid rgba(30, 79, 158, 0.1); border-radius: 14px; }
.ff-c .ff-code, .ff-c .ff-name { padding: 0 0.15rem; }
.ff-c[hidden] { display: none; }
.ff-sw { display: flex; align-items: center; justify-content: center; aspect-ratio: 4 / 3; border-radius: 10px; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.06), 0 6px 14px rgba(0, 0, 0, 0.06); margin-bottom: 0.4rem; }
.ff-sw.is-light { box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.14), 0 6px 14px rgba(0, 0, 0, 0.05); }
.ff-sw.is-none { background: repeating-linear-gradient(45deg, #f1f3f6 0 8px, #e6e9ee 8px 16px); }
.ff-sw i { font-style: normal; font-size: 0.75rem; color: var(--text-gr); }
.ff-code { font-weight: 700; font-size: 0.98rem; color: var(--text, #1d2433); overflow-wrap: anywhere; }
.ff-name { font-size: 0.85rem; color: var(--text-gr); overflow-wrap: anywhere; }
.ff-code { min-height: 1.4em; }
.ff-name { min-height: 1.35em; }
/* RAL, Pantone, HKS immer untereinander, gleich breit, gleiche Reihenfolge */
.ff-sys { display: flex; flex-direction: column; align-items: stretch; gap: 0.25rem; margin-top: 0.35rem; }
.ff-sys { padding-top: 0.5rem; border-top: 1px solid rgba(30, 79, 158, 0.1); }
.ff-sys .ff-b { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ff-b { padding: 0.12rem 0.4rem; border-radius: 4px; font-size: 0.72rem; font-weight: 700; line-height: 1.4; color: #a5adba; background: #ffffff; text-decoration: line-through; text-decoration-color: rgba(165, 173, 186, 0.7); }
.ff-b.on { color: #ffffff; background: var(--primary); text-decoration: none; }
.ff-none { margin: 0.5rem 0 0; color: var(--text-gr); font-size: 0.95rem; }
.ff-fan[hidden] { display: none; }

/* Nicht mehr erhältliche Farbe: bleibt sichtbar, aber deutlich markiert */
.ff-c.is-gone .ff-sw::after { content: ""; position: absolute; inset: 0; border-radius: inherit; background: repeating-linear-gradient(-45deg, rgba(255, 255, 255, 0.6) 0 7px, rgba(255, 255, 255, 0.2) 7px 14px); }
.ff-c.is-gone .ff-code, .ff-c.is-gone .ff-name { text-decoration: line-through; text-decoration-color: rgba(0, 0, 0, 0.35); color: var(--text-gr); }
.ff-c.is-gone .ff-vals, .ff-c.is-gone .ff-sys { opacity: 0.55; }
.ff-gone { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%) rotate(-6deg); z-index: 1; max-width: 88%; text-align: center; line-height: 1.25; padding: 0.3rem 0.6rem; border-radius: 6px; background: #ffffff; color: #b42318; border: 2px solid #b42318; font-size: 0.72rem; font-weight: 800; letter-spacing: 0.02em; text-transform: uppercase; box-shadow: 0 3px 10px rgba(0, 0, 0, 0.12); }
.ff-sw { position: relative; }

/* Downloads je Fächer (Datenblätter …) */
.ff-files { display: grid; gap: 0.9rem; margin: 0 0 1.4rem; padding: 1rem 1.1rem; border-radius: 14px; background: #f6f8fb; border: 1px solid rgba(30, 79, 158, 0.1); }
.ff-files-g { display: grid; grid-template-columns: minmax(150px, 220px) 1fr; gap: 0.5rem 1rem; align-items: start; }
.ff-files-h { font-weight: 700; color: var(--text, #1d2433); font-size: 0.95rem; padding-top: 0.5rem; }
.ff-files-list { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.ff-file { display: inline-flex; align-items: center; gap: 0.5rem; padding: 0.55rem 0.9rem; border-radius: 10px; background: #ffffff; border: 1px solid rgba(30, 79, 158, 0.14); color: var(--primary); font-weight: 600; font-size: 0.93rem; text-decoration: none; }
.ff-file:hover { background: rgba(30, 79, 158, 0.14); }
.ff-file small { font-weight: 500; color: var(--text-gr); font-size: 0.8rem; white-space: nowrap; }
.ff-file svg { flex: none; }

/* HEX, RGB, CMYK je Farbe */
.ff-vals { display: grid; gap: 0.1rem; margin-top: 0.35rem; padding: 0 0.15rem; font-size: 0.74rem; line-height: 1.45; color: var(--text, #1d2433); font-variant-numeric: tabular-nums; }
.ff-vals span { display: flex; gap: 0.4rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ff-vals i { font-style: normal; font-weight: 700; color: var(--text-gr); min-width: 2.6rem; }

/* Farbsuche nach Wert: Hinweis oben und Nähe-Markierung auf dem Farbfeld */
.ff-near { display: flex; align-items: center; gap: 0.6rem; margin: -0.4rem 0 1.4rem; color: var(--text-gr); font-size: 0.98rem; }
.ff-near[hidden] { display: none; }
.ff-near b { color: var(--primary); }
.ff-near-dot { width: 22px; height: 22px; border-radius: 6px; flex: none; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.15); }
.ff-sw { position: relative; }
.ff-match { position: absolute; left: 6px; top: 6px; padding: 0.15rem 0.45rem; border-radius: 999px; background: rgba(255, 255, 255, 0.92); color: var(--primary); font-size: 0.7rem; font-weight: 700; font-style: normal; box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12); }
.ff-c.is-best { border-color: var(--primary); box-shadow: 0 0 0 2px rgba(30, 79, 158, 0.25); }

/* Ein- und ausklappen (nur mit JavaScript – ohne bleibt alles offen) */
.ff-toggle { all: unset; cursor: pointer; }
.ff-toggle:focus-visible { outline: 2px solid var(--primary); outline-offset: 4px; border-radius: 4px; }
.ff-js .ff-fan-head { cursor: pointer; align-items: center; margin-bottom: 0.9rem; }
.ff-js .ff-fan-head:hover h2 { text-decoration: underline; text-underline-offset: 4px; }
.ff-arrow { display: none; }
.ff-js .ff-arrow { display: block; width: 34px; height: 34px; flex: none; border-radius: 50%; background: rgba(30, 79, 158, 0.08); position: relative; transition: transform 0.25s ease, background 0.2s; }
.ff-js .ff-arrow::before { content: ""; position: absolute; left: 50%; top: 45%; width: 9px; height: 9px; border-right: 2.5px solid var(--primary); border-bottom: 2.5px solid var(--primary); transform: translate(-50%, -50%) rotate(45deg); }
.ff-js .ff-fan-head:hover .ff-arrow { background: rgba(30, 79, 158, 0.15); }
.ff-js .ff-fan.is-open .ff-arrow { transform: rotate(180deg); }
.ff-js .ff-count { margin-left: auto; }
.ff-strip { display: none; }
.ff-js .ff-strip { display: flex; height: 14px; border-radius: 7px; overflow: hidden; cursor: pointer; border: 1px solid rgba(0, 0, 0, 0.1); }
.ff-strip i { flex: 1 1 0; min-width: 1px; }
/* Auf- und Zuklappen mit Animation: Höhe läuft weich von 0 auf Inhalt */
.ff-js .ff-body { display: grid; grid-template-rows: 0fr; opacity: 0; transition: grid-template-rows 0.5s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.35s ease; }
.ff-js .ff-body-in { overflow: hidden; min-height: 0; }
.ff-js .ff-fan.is-open .ff-body { grid-template-rows: 1fr; opacity: 1; }
.ff-js .ff-fan:not(.is-open) .ff-body { visibility: hidden; transition: grid-template-rows 0.5s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.35s ease, visibility 0s linear 0.5s; }
.ff-js .ff-body-in > :first-child { margin-top: 0.2rem; }
.ff-js .ff-strip { max-height: 16px; transition: max-height 0.35s ease, opacity 0.3s ease, margin 0.35s ease; }
.ff-js .ff-fan.is-open .ff-strip { max-height: 0; opacity: 0; border-width: 0; }
@media (prefers-reduced-motion: reduce) { .ff-js .ff-body, .ff-js .ff-strip, .ff-js .ff-fan:not(.is-open) .ff-body { transition: none; } }
.ff-js .ff-fan { margin-top: 1.6rem; }

@media (max-width: 768px) {
    .legal-box.ff-box { padding: 2rem 1.25rem; border-radius: 18px; }
    .ff-intro { font-size: 1rem; }
    .ff-search { max-width: none; }
    .ff-grid { grid-template-columns: repeat(auto-fill, minmax(128px, 1fr)); gap: 0.7rem; }
    .ff-c { padding: 0.5rem 0.5rem 0.6rem; border-radius: 12px; }
    .ff-b { font-size: 0.66rem; padding: 0.1rem 0.3rem; }
    .ff-fan-head h2 { font-size: 1.25rem; }
    .ff-count { margin-left: 0; width: 100%; }
    .ff-js .ff-count { margin-left: auto; width: auto; }
    .ff-js .ff-fan-head p { width: 100%; order: 3; }
    .ff-files-g { grid-template-columns: 1fr; }
    .ff-files-h { padding-top: 0; }
    .ff-files { padding: 0.9rem; }
    .ff-file { width: 100%; line-height: 1.35; }
    .ff-file small { margin-left: auto; }
}
