/* Ergänzende Layouts für Rechtstexte, Linkprofil und Fehlerseite. */
.page-back {
  display: inline-flex;
  align-items: center;
  margin-bottom: 52px;
  color: var(--text-muted);
  font-size: .82rem;
  font-weight: 500;
  text-decoration: none;
  transition: color .2s ease;
}

.page-back:hover { color: var(--accent); }

.page-eyebrow {
  display: block;
  color: var(--accent);
  font-family: var(--mono);
  font-size: .7rem;
  font-weight: 500;
  line-height: 1.5;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.document-page .page-hero {
  padding: 72px 0 48px;
  border-bottom: 1px solid var(--border);
  background: var(--bg);
}

.document-page .page-hero .container,
.document-page .page-body .container { max-width: 824px; }

.document-page .page-hero h1 {
  margin: 15px 0 20px;
  color: var(--text);
  font-size: clamp(2rem, 5.5vw, 4rem);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -.055em;
  overflow-wrap: anywhere;
}

.document-page .page-hero p {
  max-width: 560px;
  color: var(--text-muted);
  font-size: .98rem;
  line-height: 1.7;
}

.document-page .page-body { padding: 60px 0 112px; }
.document-page .prose { max-width: none; }

.document-page .prose h2 {
  margin: 42px 0 14px;
  color: var(--text);
  font-size: 1.1rem;
  font-weight: 600;
  line-height: 1.5;
  letter-spacing: -.025em;
}

.document-page .prose h2:first-child { margin-top: 0; }

.document-page .prose p,
.document-page .prose li {
  color: var(--text-muted);
  font-size: .93rem;
  line-height: 1.9;
}

.document-page .prose p { margin: 0 0 18px; }
.document-page .prose ul { margin: 0 0 18px; padding-left: 22px; }
.document-page .prose li + li { margin-top: 5px; }
.document-page .prose a { color: var(--accent); overflow-wrap: anywhere; }

.links-shell {
  width: min(100% - 48px, 620px);
  margin-inline: auto;
  padding: 72px 0 96px;
}

.profile { margin-bottom: 48px; text-align: center; }

.profile-avatar {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 88px;
  height: 88px;
  margin: 0 auto 28px;
  border-radius: 24px;
  background: #7555dc;
  color: #fff;
  font-size: 2.6rem;
  font-weight: 600;
  letter-spacing: -.08em;
  transform: rotate(-6deg);
}

.profile-avatar span { color: #e6ddff; }

.profile-name {
  margin: 12px 0 8px;
  color: var(--text);
  font-size: clamp(1.75rem, 5.5vw, 2.65rem);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -.055em;
}

.profile-handle {
  color: var(--text-muted);
  font-family: var(--mono);
  font-size: .78rem;
}

.profile-bio {
  margin-top: 24px;
  color: var(--text-muted);
  font-size: .9rem;
  line-height: 1.85;
}

.links-group + .links-group { margin-top: 32px; }

.links-group-title {
  display: flex;
  gap: 14px;
  align-items: baseline;
  margin-bottom: 12px;
  color: var(--text-muted);
  font-size: .72rem;
  font-weight: 500;
  letter-spacing: .04em;
}

.links-group-title > span {
  color: var(--accent);
  font-family: var(--mono);
  font-size: .66rem;
}

.link-item {
  display: flex;
  gap: 18px;
  align-items: center;
  padding: 19px 20px;
  border: 1px solid var(--border);
  border-radius: 13px;
  background: var(--bg-2);
  color: var(--text);
  text-decoration: none;
  transition: border-color .2s ease, background .2s ease, transform .2s ease;
}

.link-item + .link-item { margin-top: 10px; }
.link-item:hover { transform: translateY(-2px); border-color: var(--accent); background: var(--bg-3); }

.link-icon {
  display: flex;
  flex: 0 0 44px;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: #211b3b;
  color: var(--accent);
  font-size: 1.2rem;
  font-weight: 600;
  letter-spacing: -.07em;
}

.icon-traado { background: #172640; color: #80b4ff; }
.icon-meditrack { background: #211b3b; color: #b2a4ff; }
.link-text { flex: 1; min-width: 0; }
.link-text strong { display: block; font-size: .9rem; font-weight: 600; }
.link-label { display: block; margin-top: 5px; color: var(--text-muted); font-size: .73rem; line-height: 1.5; }
.link-arrow { color: var(--accent); font-size: 1.15rem; }

.link-item-featured { background: #7555dc; border-color: #7555dc; color: #fff; }
.link-item-featured .link-icon { background: #211b3b; color: #e6ddff; }
.link-item-featured .link-label { color: #f0eaff; }
.link-item-featured .link-arrow { color: #e6ddff; }
.link-item-featured:hover { background: #6748ce; border-color: #b2a4ff; }

.link-live {
  display: inline-block;
  margin-left: 8px;
  padding: 2px 6px;
  border-radius: 4px;
  background: #172640;
  color: #80b4ff;
  font-family: var(--mono);
  font-size: .56rem;
  font-weight: 400;
  line-height: 1.4;
  vertical-align: 2px;
}

.links-contact {
  display: block;
  margin: 38px 0 0;
  color: var(--text-muted);
  font-size: .76rem;
  text-align: center;
  text-decoration: none;
  line-height: 1.8;
}

.links-contact span { display: block; color: var(--accent); font-weight: 500; }
.links-contact:hover span { text-decoration: underline; text-underline-offset: 4px; }

.error-page { display: flex; flex-direction: column; min-height: 100vh; }

.error-container {
  display: flex;
  flex: 1;
  min-height: calc(100vh - 130px);
  align-items: center;
  justify-content: center;
  padding: 152px 24px 96px;
}

.error-content { width: min(100%, 680px); text-align: center; }

.error-code {
  margin: 30px 0 22px;
  color: var(--accent);
  font-size: clamp(7rem, 20vw, 12.5rem);
  font-weight: 600;
  line-height: 1;
  letter-spacing: -.09em;
}

.error-code > span:first-child {
  display: inline-block;
  width: .8em;
  margin: 0 .045em;
  border-radius: .22em;
  background: #211b3b;
  transform: rotate(-8deg);
}

.error-code-dot { color: #80b4ff; }

.error-title {
  margin-bottom: 18px;
  color: var(--text);
  font-size: clamp(1.65rem, 4vw, 2.5rem);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -.05em;
}

.error-text {
  max-width: 440px;
  margin: 0 auto 30px;
  color: var(--text-muted);
  font-size: .92rem;
  line-height: 1.8;
}

.error-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

@media (max-width: 600px) {
  .document-page .page-hero { padding-top: 48px; padding-bottom: 36px; }
  .page-back { margin-bottom: 36px; }
  .document-page .page-body { padding: 40px 0 72px; }
  .document-page .prose h2 { font-size: 1rem; }
  .document-page .prose p, .document-page .prose li { font-size: .875rem; }
  .links-shell { width: calc(100% - 40px); padding: 48px 0 64px; }
  .profile { margin-bottom: 36px; }
  .link-item { gap: 13px; padding: 15px; }
  .link-icon { flex-basis: 39px; width: 39px; height: 39px; }
  .link-label { font-size: .7rem; }
  .link-text strong { font-size: .85rem; }
  .error-container { min-height: calc(100vh - 170px); padding: 120px 24px 72px; }
}

@media (prefers-reduced-motion: reduce) {
  .page-back, .link-item { transition: none; }
  .link-item:hover { transform: none; }
}
