/*
 * Bridges older page building blocks (shop, status, legal pages, blog,
 * project pages) to the Cloudnetz design. Only tokens and generic helpers;
 * page-specific stylesheets keep working through the variable aliases.
 */
:root {
  --surface-2: var(--surface2);
  --border: var(--line);
  --accent-2: #45dcff;
  --accent-soft: #38cfff1f;
  --shadow: 0 20px 60px #0006;
}
html[data-theme=light] {
  --surface-2: #eaf2fa;
  --border: #cbd9e7;
  --accent-2: #087bb4;
  --accent-soft: #006a9e14;
  --shadow: 0 8px 24px #204f6e12;
}

.container { max-width: var(--max); margin: auto; padding: 0 26px; }
.section-title { max-width: 770px; margin-bottom: 35px; }
.section-title p { color: var(--muted); font-size: 17px; }
.section-title h2 { margin-top: 14px; }
.gradient-text { color: var(--accent); }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 26px; }
.text-link { display: inline-flex; gap: 8px; margin-top: 20px; color: var(--accent); font-size: 14px; font-weight: 700; }
.text-link:hover { text-decoration: underline; }

/* Buttons of older templates look like the design buttons. */
.btn { display: inline-flex; justify-content: center; align-items: center; gap: 9px; border-radius: 11px; padding: 13px 20px; font-weight: 760; font-size: 14px; border: 1px solid #44536a; background: #182638; color: #fff; transition: transform .2s, background .2s; text-decoration: none; cursor: pointer; }
.btn:hover { transform: translateY(-2px); }
.btn-primary { border-color: transparent; background: linear-gradient(120deg, #45dcff, #29baff); color: #071c30; }
.btn-primary:hover { background: linear-gradient(120deg, #79e7ff, #54ccff); }
html[data-theme=light] .btn { background: #fff; color: #1c405e; border-color: #9fb7cc; }
html[data-theme=light] .btn-primary { background: linear-gradient(120deg, #087bb4, #00699f); color: #fff; border-color: transparent; }

/* Hero areas of older pages use the page hero of the design. */
.content-hero, .legal-hero, .blog-hero, .shop-hero, .shop-domain-hero { padding: 64px 0 60px; background: radial-gradient(ellipse at 88% 8%, #075da046, transparent 48%); }
html[data-theme=light] .content-hero, html[data-theme=light] .legal-hero, html[data-theme=light] .blog-hero, html[data-theme=light] .shop-hero, html[data-theme=light] .shop-domain-hero { background: radial-gradient(ellipse at 88% 8%, #d9effc, transparent 52%); }
.content-hero h1, .legal-hero h1, .blog-hero h1, .shop-hero h1, .shop-domain-hero h1 { font-size: clamp(38px, 5.2vw, 62px); max-width: 940px; margin-top: 18px; }
.content-hero p, .legal-hero p, .blog-hero p, .shop-hero p, .shop-domain-hero p { color: var(--muted); font-size: 18px; max-width: 760px; }
.shop-hero::before, .shop-hero::after { display: none; }

.feature-panel, .legal-card { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 30px; }
html[data-theme=light] .feature-panel, html[data-theme=light] .legal-card { box-shadow: 0 8px 24px #204f6e06; }
.feature-panel p { color: var(--muted); font-size: 14px; }

/* Long legal texts. */
.legal-card { max-width: 900px; }
.legal-card h2 { font-size: 22px; letter-spacing: -.02em; margin: 34px 0 12px; }
.legal-card h2:first-child { margin-top: 0; }
.legal-card h3 { font-size: 17px; margin: 22px 0 8px; }
.legal-card p, .legal-card li { color: var(--muted); font-size: 15px; line-height: 1.8; }
.legal-card a { color: var(--accent); text-decoration: underline; }

/* Forms on shop and portal-facing public pages. */
.shop-hero .eyebrow, .content-hero .eyebrow, .blog-hero .eyebrow { margin-bottom: 4px; }

@media (max-width: 650px) {
  .container { padding: 0 18px; }
  .content-hero, .legal-hero, .blog-hero, .shop-hero, .shop-domain-hero { padding: 35px 0 44px; }
  .feature-panel, .legal-card { padding: 24px; }
}

/* Blog: category links in the filter bar, images inside articles. */
.filter-bar a[aria-current=page] { background: var(--accent); border-color: var(--accent); color: #071c30; }
html[data-theme=light] .filter-bar a[aria-current=page] { color: #fff; }
.article-body img { display: block; max-width: 100%; height: auto; margin: 24px auto; border-radius: 14px; }
.article-body .article-image { margin: 0 0 32px; width: 100%; }
.article-body blockquote { border-left: 3px solid var(--accent); margin: 28px 0; padding: 4px 0 4px 20px; color: var(--muted); }
.article-body code { background: var(--surface2); border-radius: 5px; padding: 2px 6px; font-size: .92em; }
html[data-theme=light] .article-body p, html[data-theme=light] .article-body li { color: #36526a; }
.post-art img { display: block; }

/* Cart link in the header (only on pages with a session, e.g. ordering). */
.nav-cart-link { display: inline-flex; align-items: center; gap: 6px; }
.nav-cart-badge { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: #38cfff; color: #071c30; font-size: 11px; font-weight: 800; }

/* User menu in the header (replaces the "Kundenbereich" link when signed in). */
.account-menu { position: relative; }
.account-menu > summary { display: flex; align-items: center; gap: 10px; min-height: 44px; list-style: none; cursor: pointer; border: 1px solid transparent; border-radius: 12px; padding: 4px 8px; }
.account-menu > summary::-webkit-details-marker { display: none; }
.account-menu > summary:hover, .account-menu[open] > summary { border-color: var(--line); background: var(--surface); }
.account-menu > summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.account-text { display: grid; text-align: right; line-height: 1.25; }
.account-text strong { font-size: 14px; }
.account-text small { color: var(--muted); font-size: 12px; }
.account-avatar { display: grid; place-items: center; width: 40px; height: 40px; flex-shrink: 0; border: 1px solid #38cfff40; border-radius: 50%; background: #38cfff1a; color: var(--accent); font-size: 14px; font-weight: 800; object-fit: cover; }
.account-menu .chevron { width: 8px; height: 8px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg); margin-top: -4px; color: var(--muted); }
.account-panel { position: absolute; right: 0; top: calc(100% + 10px); z-index: 60; width: 270px; border: 1px solid var(--line); border-radius: 16px; padding: 8px; background: var(--surface); box-shadow: var(--shadow); }
.account-head { display: grid; gap: 2px; border-bottom: 1px solid var(--line); padding: 10px 12px 12px; }
.account-head strong { font-size: 15px; }
.account-head small { overflow: hidden; color: var(--muted); font-size: 12px; text-overflow: ellipsis; }
.account-panel nav { display: grid; padding: 6px 0; }
.account-panel nav a, .account-foot button { display: block; width: 100%; border: 0; border-radius: 10px; padding: 10px 12px; background: none; color: inherit; font: inherit; font-size: 14px; text-align: left; cursor: pointer; }
.account-panel nav a:hover, .account-foot button:hover, .account-panel nav a:focus-visible, .account-foot button:focus-visible { background: var(--surface2); color: var(--accent); }
.account-foot { border-top: 1px solid var(--line); padding-top: 6px; }
@media (max-width: 1180px) { .account-text { display: none; } }
@media (max-width: 650px) { .account-menu .chevron { display: none; } .account-panel { position: fixed; left: 16px; right: 16px; top: 88px; width: auto; } }
