/*
Theme Name: ToolWissen
Theme URI: https://toolwissen.de/
Author: ToolWissen
Author URI: https://toolwissen.de/
Description: Sehr schlankes, neutrales Basis-Theme für ToolWissen. Das sichtbare Seitenlayout bleibt in den ToolWissen-Funktionsplugins; das Theme liefert nur die saubere WordPress-Grundstruktur ohne Page-Builder-Abhängigkeit.
Version: 1.0
Requires at least: 6.4
Requires PHP: 7.4
Text Domain: toolwissen-theme
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
*/

/*
 * ToolWissen Theme v1.0
 * ---------------------
 * Absichtlich sehr kleine Basis. Keine globalen Karten-, Button-, Container-
 * oder Breakpoint-Regeln: Die bereits fertigen ToolWissen-Plugins bleiben die
 * visuelle Quelle der Wahrheit und werden durch einen Theme-Wechsel nicht neu
 * dimensioniert.
 */

html {
    box-sizing: border-box;
    min-width: 320px;
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

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

body {
    min-width: 320px;
    margin: 0;
    background: #ffffff;
    color: #071735;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    font-size: 16px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

img,
picture,
video,
canvas,
svg {
    max-width: 100%;
}

img,
picture,
video,
canvas {
    height: auto;
}

button,
input,
select,
textarea {
    font: inherit;
}

.tw-theme-site,
.tw-theme-main,
.tw-theme-entry {
    width: 100%;
    min-width: 0;
    margin: 0;
    padding: 0;
}

.tw-theme-main {
    display: block;
}

.tw-theme-main:focus {
    outline: none;
}

/* Nur Theme-Fallbackseiten. Plugin-Seiten werden hiervon nicht berührt. */
.tw-theme-fallback {
    width: min(calc(100% - 40px), 1180px);
    margin: 0 auto;
    padding: clamp(36px, 5vw, 72px) 0;
    color: #071735;
}

.tw-theme-fallback__header {
    margin: 0 0 28px;
}

.tw-theme-fallback__header h1 {
    margin: 0 0 10px;
    color: #071735;
    font-size: clamp(2rem, 4vw, 3.35rem);
    line-height: 1.06;
    letter-spacing: -0.045em;
}

.tw-theme-fallback__header p,
.tw-theme-fallback__meta,
.tw-theme-fallback__excerpt {
    color: #65779a;
}

.tw-theme-fallback__list {
    display: grid;
    gap: 16px;
}

.tw-theme-fallback__item {
    padding: 22px;
    border: 1px solid #dce5f2;
    border-radius: 18px;
    background: #ffffff;
}

.tw-theme-fallback__item h2 {
    margin: 0 0 8px;
    font-size: clamp(1.25rem, 2vw, 1.6rem);
    line-height: 1.18;
}

.tw-theme-fallback__item a {
    color: #071735;
    text-decoration: none;
}

.tw-theme-fallback__item a:hover,
.tw-theme-fallback__item a:focus-visible {
    color: #075ff7;
}

.tw-theme-fallback__excerpt {
    margin: 0;
    line-height: 1.65;
}

.tw-theme-fallback__pagination {
    margin-top: 28px;
}

.tw-theme-fallback__back {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    margin-top: 20px;
    padding: 0 18px;
    border: 1px solid #075ff7;
    border-radius: 12px;
    background: #075ff7;
    color: #ffffff;
    font-weight: 750;
    text-decoration: none;
}

@media (max-width: 680px) {
    .tw-theme-fallback {
        width: min(calc(100% - 24px), 640px);
        padding: 28px 0 42px;
    }

    .tw-theme-fallback__item {
        padding: 18px;
        border-radius: 16px;
    }
}

/* ============================================================
   ToolWissen v1.0 – native 404-Seite
   ============================================================ */
.tw-404{
    width:min(calc(100% - 40px),1180px);
    margin:0 auto;
    padding:clamp(42px,6vw,88px) 0 clamp(58px,8vw,110px);
}
.tw-404__panel{
    position:relative;
    overflow:hidden;
    width:100%;
    padding:clamp(30px,5vw,62px);
    border:1px solid #dce6f3;
    border-radius:28px;
    background:linear-gradient(135deg,#fbfdff 0%,#f6f9ff 58%,#eef5ff 100%);
    box-shadow:0 16px 50px rgba(7,23,53,.055);
}
.tw-404__panel::after{
    content:"";
    position:absolute;
    z-index:0;
    right:-90px;
    top:-100px;
    width:310px;
    height:310px;
    border-radius:50%;
    background:radial-gradient(circle,rgba(7,95,247,.11) 0%,rgba(7,95,247,0) 70%);
    pointer-events:none;
}
.tw-404__panel>*{position:relative;z-index:1}
.tw-404__code{
    margin:0 0 8px;
    color:#075ff7;
    font-size:clamp(1rem,1.3vw,1.16rem);
    font-weight:900;
    letter-spacing:.12em;
}
.tw-404__eyebrow{
    display:inline-flex;
    align-items:center;
    min-height:34px;
    margin:0 0 16px;
    padding:0 13px;
    border:1px solid #d7e5fb;
    border-radius:999px;
    background:#fff;
    color:#075ff7;
    font-size:.84rem;
    line-height:1;
    font-weight:800;
}
.tw-404 h1{
    max-width:760px;
    margin:0;
    color:#071735;
    font-size:clamp(2.15rem,4.4vw,4.15rem);
    line-height:1.04;
    letter-spacing:-.045em;
    font-weight:900;
    text-wrap:balance;
}
.tw-404__lead{
    max-width:780px;
    margin:18px 0 0;
    color:#526684;
    font-size:clamp(1rem,1.35vw,1.14rem);
    line-height:1.65;
}
.tw-404__search{
    display:grid;
    grid-template-columns:minmax(0,1fr) auto;
    gap:10px;
    width:min(100%,720px);
    margin:28px 0 0;
}
.tw-404__search input{
    width:100%;
    min-width:0;
    min-height:52px;
    padding:0 16px;
    border:1px solid #cfdceb;
    border-radius:13px;
    outline:0;
    background:#fff;
    color:#071735;
    box-shadow:none;
}
.tw-404__search input:focus{
    border-color:#75a9ff;
    box-shadow:0 0 0 3px rgba(7,95,247,.10);
}
.tw-404__search button{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    gap:8px;
    min-height:52px;
    padding:0 20px;
    border:1px solid #075ff7;
    border-radius:13px;
    background:#075ff7;
    color:#fff;
    font-weight:800;
    cursor:pointer;
}
.tw-404__search button:hover{background:#0753d9;border-color:#0753d9}
.tw-404__search button:focus-visible{outline:3px solid rgba(7,95,247,.22);outline-offset:3px}
.tw-404__search svg{width:19px;height:19px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round}
.tw-404__links{
    display:flex;
    flex-wrap:wrap;
    gap:10px;
    margin-top:20px;
}
.tw-404__link{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    min-height:44px;
    padding:0 17px;
    border:1px solid #cfdceb;
    border-radius:12px;
    background:#fff;
    color:#071735;
    font-weight:780;
    text-decoration:none;
}
.tw-404__link:hover,.tw-404__link:focus-visible{border-color:#9bbff6;color:#075ff7;text-decoration:none}
.tw-404__link--primary{border-color:#075ff7;color:#075ff7}
@media(max-width:680px){
    .tw-404{width:min(calc(100% - 24px),640px);padding:28px 0 50px}
    .tw-404__panel{padding:24px 18px;border-radius:22px}
    .tw-404__search{grid-template-columns:1fr}
    .tw-404__search button{width:100%}
    .tw-404__links{display:grid;grid-template-columns:1fr 1fr}
    .tw-404__link--primary{grid-column:1/-1}
}
