/* =============================================================================
   dbrs.css – Zentrales Design-System für tolksdorf.digital DBRS HTML-Dateien
   Pfad auf Server: /var/www/html/css/dbrs.css
   Einbindung: <link rel="stylesheet" href="/css/fonts.css">
               <link rel="stylesheet" href="/css/dbrs.css">

   Abgeleitet von: tolksdorf-digital-official-context-en-US.html (v1.1)
   Variante: "Official Context" — helles, professionelles Layout
   ============================================================================= */

/* =============================================================================
   1. CSS CUSTOM PROPERTIES (Design Tokens)
   ============================================================================= */
:root {
  /* Farben */
  --td-blue:          #1a3a5c;
  --td-blue-mid:      #2a5a8c;
  --td-accent:        #0077cc;
  --td-accent-light:  #e8f4fd;
  --td-dark:          #0d1b2a;
  --td-text:          #1a1a2e;
  --td-muted:         #6b7280;
  --td-border:        #d1dde8;
  --td-bg:            #f8fafc;
  --td-white:         #ffffff;
  --td-green:         #166534;
  --td-green-bg:      #f0fdf4;
  --td-warn-bg:       #fefce8;
  --td-warn-border:   #ca8a04;
  --td-section-num:   #94a3b8;
  --td-ref-bg:        #f5f3ff;
  --td-ref-border:    #7c3aed;

  /* Typografie */
  --font-sans:   'Outfit', system-ui, -apple-system, sans-serif;
  --font-mono:   'DM Mono', 'Cascadia Code', 'Consolas', monospace;
  --font-serif:  'DM Serif Display', Georgia, serif;

  /* Abstände */
  --space-xs:   0.25rem;
  --space-sm:   0.5rem;
  --space-md:   1rem;
  --space-lg:   1.5rem;
  --space-xl:   2rem;
  --space-2xl:  3rem;

  /* Radien */
  --radius-sm:  4px;
  --radius-md:  6px;
  --radius-lg:  10px;
}

/* =============================================================================
   2. RESET & BASE
   ============================================================================= */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 15px;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.65;
  color: var(--td-text);
  background: var(--td-bg);
  min-height: 100vh;
}

/* =============================================================================
   3. TOP BAR
   ============================================================================= */
.td-topbar {
  background: var(--td-dark);
  color: #94a3b8;
  font-size: 11.5px;
  letter-spacing: 0.05em;
  padding: 0.4rem 1.5rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.td-topbar a {
  color: #7eb8e8;
  text-decoration: none;
}

.td-topbar a:hover {
  color: #fff;
}

.td-topbar .td-badge {
  background: var(--td-accent);
  color: #fff;
  padding: 1px 8px;
  border-radius: 3px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.td-topbar .td-sep {
  color: #334155;
}

/* =============================================================================
   4. HEADER
   ============================================================================= */
.td-header {
  background: linear-gradient(135deg, #0f3460 0%, var(--td-dark) 100%);
  color: #fff;
  padding: 2rem 1.5rem 1.75rem;
}

.td-header h1 {
  font-family: var(--font-sans);
  font-size: clamp(1.4rem, 3vw, 1.9rem);
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 0.5rem;
  letter-spacing: -0.01em;
}

.td-header h1 em {
  font-style: normal;
  color: #7eb8e8;
}

.td-header .td-meta {
  font-size: 12.5px;
  color: #94a3b8;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  margin-top: 0.75rem;
}

.td-header .td-meta span::before {
  content: "· ";
  color: #475569;
}
.td-header .td-meta span:first-child::before {
  content: "";
}

/* =============================================================================
   5. LANGUAGE SWITCHER
   ============================================================================= */
.td-lang-switcher {
  display: flex;
  gap: 0.5rem;
  margin: 0.75rem 0 0;
  flex-wrap: wrap;
}

.td-lang-switcher a,
.td-lang-switcher span {
  font-size: 12px;
  padding: 3px 10px;
  border-radius: 3px;
  border: 1px solid #334155;
  color: #94a3b8;
  text-decoration: none;
  transition: background 0.15s;
}

.td-lang-switcher a:hover {
  background: #1e293b;
  color: #fff;
}

.td-lang-switcher .td-lang-active {
  background: var(--td-accent);
  color: #fff;
  border-color: var(--td-accent);
}

/* =============================================================================
   6. AI NOTICE / WARNING BOX
   ============================================================================= */
.td-ai-notice {
  background: var(--td-warn-bg);
  border-left: 4px solid var(--td-warn-border);
  padding: 0.75rem 1rem;
  font-size: 13px;
  color: #713f12;
  margin: 1rem 0;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.td-ai-notice strong {
  display: block;
  margin-bottom: 0.2rem;
  color: #92400e;
}

/* =============================================================================
   7. LAYOUT – Zweispaltig mit Sidebar
   ============================================================================= */
.td-layout {
  display: grid;
  grid-template-columns: 1fr 240px;
  grid-template-areas: "main sidebar";
  gap: 2rem;
  max-width: 1100px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
  align-items: start;
}

.td-main {
  grid-area: main;
  min-width: 0;
}

.td-sidebar {
  grid-area: sidebar;
  position: sticky;
  top: 1rem;
}

@media (max-width: 768px) {
  .td-layout {
    grid-template-columns: 1fr;
    grid-template-areas: "main" "sidebar";
  }
  .td-sidebar {
    position: static;
  }
}

/* =============================================================================
   8. TOC (Table of Contents – Sidebar)
   ============================================================================= */
.toc-box {
  background: var(--td-white);
  border: 1px solid var(--td-border);
  border-radius: var(--radius-md);
  padding: 1rem;
  font-size: 13px;
  margin-bottom: 1rem;
}

.toc-box h3 {
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--td-muted);
  margin-bottom: 0.6rem;
}

.toc-box ol {
  list-style: none;
  padding: 0;
}

.toc-box li {
  padding: 0.2rem 0;
  border-bottom: 1px solid #f1f5f9;
}

.toc-box a {
  color: var(--td-accent);
  text-decoration: none;
  font-size: 12.5px;
}

.toc-box a:hover {
  text-decoration: underline;
}

.toc-num {
  color: var(--td-section-num);
  font-size: 11px;
  margin-right: 4px;
}

/* =============================================================================
   9. DOCUMENT INFO (Sidebar-Box)
   ============================================================================= */
.td-doc-info {
  background: var(--td-white);
  border: 1px solid var(--td-border);
  border-radius: var(--radius-md);
  padding: 1rem;
  font-size: 12.5px;
  margin-bottom: 1rem;
}

.td-doc-info h3 {
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--td-muted);
  margin-bottom: 0.6rem;
}

.td-doc-info dl {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.2rem 0.75rem;
}

.td-doc-info dt {
  color: var(--td-muted);
  font-size: 11px;
  white-space: nowrap;
}

.td-doc-info dd {
  color: var(--td-text);
}

/* =============================================================================
   10. SECTIONS & HEADINGS
   ============================================================================= */
.td-section {
  margin-bottom: 2.5rem;
}

.td-section-label {
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--td-section-num);
  margin-bottom: 0.5rem;
  font-family: var(--font-mono);
}

h2 {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--td-blue);
  border-bottom: 2px solid var(--td-border);
  padding-bottom: 0.4rem;
  margin-bottom: 1rem;
  line-height: 1.25;
}

h3 {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--td-blue-mid);
  margin: 1.25rem 0 0.6rem;
}

h4 {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--td-text);
  margin: 1rem 0 0.4rem;
}

p {
  margin-bottom: 0.75rem;
}

/* =============================================================================
   11. CALLOUT BOXES
   ============================================================================= */
.callout {
  background: var(--td-accent-light);
  border-left: 3px solid var(--td-accent);
  padding: 0.75rem 1rem;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-size: 13.5px;
  margin: 1rem 0;
}

.callout strong {
  display: block;
  margin-bottom: 0.2rem;
  color: var(--td-blue);
}

/* =============================================================================
   12. RULE / NOTICE BOX (grün)
   ============================================================================= */
.rule-box {
  background: var(--td-green-bg);
  border-left: 3px solid var(--td-green);
  padding: 0.75rem 1rem;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-size: 13px;
  margin: 1rem 0;
}

.rule-box strong {
  color: var(--td-green);
  display: block;
  margin-bottom: 0.25rem;
}

/* =============================================================================
   13. LINKS & LISTEN
   ============================================================================= */
a {
  color: var(--td-accent);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.link-list {
  list-style: none;
  padding: 0;
  margin: 0.5rem 0;
}

.link-list li {
  padding: 0.2rem 0;
}

.link-list li::before {
  content: "→ ";
  color: var(--td-muted);
}

ul, ol {
  padding-left: 1.5rem;
  margin-bottom: 0.75rem;
}

li {
  margin-bottom: 0.25rem;
}

code {
  font-family: var(--font-mono);
  font-size: 0.85em;
  background: #f1f5f9;
  padding: 1px 5px;
  border-radius: 3px;
  color: var(--td-blue);
}

pre {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  background: #1e293b;
  color: #e2e8f0;
  padding: 1rem;
  border-radius: var(--radius-md);
  overflow-x: auto;
  margin: 1rem 0;
}

/* =============================================================================
   14. LOCATION CARDS
   ============================================================================= */
.location-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
  margin: 1rem 0;
}

.location-card {
  background: var(--td-white);
  border: 1px solid var(--td-border);
  border-radius: var(--radius-md);
  padding: 1rem;
  font-size: 13.5px;
}

.location-card .location-country {
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--td-muted);
  margin-bottom: 0.4rem;
}

.location-card strong {
  display: block;
  font-size: 14px;
  margin-bottom: 0.25rem;
  color: var(--td-blue);
}

.location-card address {
  font-style: normal;
  color: var(--td-muted);
  line-height: 1.5;
  font-size: 13px;
}

/* =============================================================================
   15. VALUES GRID
   ============================================================================= */
.values-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 0.75rem;
  margin: 1rem 0;
}

.value-card {
  background: var(--td-white);
  border: 1px solid var(--td-border);
  border-radius: var(--radius-md);
  padding: 0.85rem;
  font-size: 13px;
  line-height: 1.5;
}

.value-card .value-icon {
  font-size: 1.1rem;
  margin-bottom: 0.3rem;
  display: block;
}

.value-card strong {
  color: var(--td-blue);
  display: block;
  margin-bottom: 0.2rem;
  font-size: 13.5px;
}

/* =============================================================================
   16. METHOD CARDS
   ============================================================================= */
.method-card {
  background: var(--td-white);
  border: 1px solid var(--td-border);
  border-left: 4px solid var(--td-accent);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  padding: 1rem;
  margin: 0.75rem 0;
  font-size: 13.5px;
}

.method-card .method-tag {
  display: inline-block;
  background: var(--td-accent-light);
  color: var(--td-blue-mid);
  font-size: 11px;
  letter-spacing: 0.06em;
  padding: 2px 8px;
  border-radius: 3px;
  margin-bottom: 0.5rem;
  font-weight: 600;
}

/* =============================================================================
   17. AI AGENT CARDS
   ============================================================================= */
.agents-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.75rem;
  margin: 1rem 0;
}

.agent-card {
  background: var(--td-white);
  border: 1px solid var(--td-border);
  border-radius: var(--radius-md);
  padding: 1rem;
  font-size: 13px;
  text-align: center;
}

.agent-name {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--td-blue);
  margin-bottom: 0.35rem;
  display: block;
}

.agent-role {
  display: inline-block;
  background: var(--td-accent);
  color: #fff;
  font-size: 10px;
  padding: 2px 8px;
  border-radius: 3px;
  margin-bottom: 0.5rem;
  letter-spacing: 0.05em;
}

.agent-desc {
  color: var(--td-muted);
  font-size: 12.5px;
  line-height: 1.5;
}

/* =============================================================================
   18. REFERENCE CARDS
   ============================================================================= */
.ref-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 0.75rem;
  margin: 1rem 0;
}

.ref-card {
  background: var(--td-white);
  border: 1px solid var(--td-border);
  border-radius: var(--radius-md);
  padding: 0.85rem 1rem;
  font-size: 13px;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.ref-card .ref-client {
  font-size: 11px;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--td-muted);
}

.ref-card .ref-title {
  font-weight: 600;
  color: var(--td-blue);
  font-size: 13.5px;
}

.ref-card .ref-desc {
  color: var(--td-text);
  flex: 1;
}

/* Kunden-Kurzübersicht */
.ref-customer-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.5rem;
  margin: 0.75rem 0;
}

.ref-customer-item {
  background: var(--td-ref-bg);
  border-left: 3px solid var(--td-ref-border);
  padding: 0.5rem 0.75rem;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-size: 13px;
}

.ref-customer-item strong {
  display: block;
  color: var(--td-blue);
}

.ref-customer-item span {
  color: var(--td-muted);
  font-size: 12px;
}

/* =============================================================================
   19. MACHINE RESOURCES
   ============================================================================= */
.resource-list {
  list-style: none;
  padding: 0;
}

.resource-list li {
  padding: 0.4rem 0;
  border-bottom: 1px solid #f1f5f9;
}

.resource-url {
  display: block;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--td-muted);
  margin-top: 1px;
}

/* =============================================================================
   20. TAGS / BADGES
   ============================================================================= */
.td-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin: 0.5rem 0;
}

.td-tag {
  background: var(--td-accent-light);
  color: var(--td-blue);
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 3px;
  font-weight: 500;
  letter-spacing: 0.04em;
}

.td-tag-mono {
  font-family: var(--font-mono);
  background: #f1f5f9;
  color: var(--td-muted);
  font-size: 11px;
  padding: 2px 7px;
  border-radius: 3px;
}

/* =============================================================================
   21. FOOTER
   ============================================================================= */
.td-footer {
  background: var(--td-dark);
  color: #64748b;
  font-size: 12px;
  padding: 2rem 1.5rem;
  margin-top: 3rem;
}

.td-footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 1.5rem;
  max-width: 1100px;
  margin: 0 auto 1.5rem;
}

.td-footer-col h4 {
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #94a3b8;
  margin-bottom: 0.6rem;
}

.td-footer-col ul {
  list-style: none;
  padding: 0;
}

.td-footer-col li {
  padding: 0.2rem 0;
}

.td-footer-col a {
  color: #64748b;
  text-decoration: none;
  transition: color 0.15s;
}

.td-footer-col a:hover {
  color: #94a3b8;
}

.td-footer-bottom {
  max-width: 1100px;
  margin: 0 auto;
  padding-top: 1rem;
  border-top: 1px solid #1e293b;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 2rem;
  color: #475569;
  font-size: 11px;
  font-family: var(--font-mono);
}

/* =============================================================================
   22. UTILITY CLASSES
   ============================================================================= */
.td-mono  { font-family: var(--font-mono); }
.td-muted { color: var(--td-muted); }
.td-small { font-size: 12.5px; }
.td-rule  { border: none; border-top: 1px solid var(--td-border); margin: 1.5rem 0; }

/* Breadcrumb */
.td-breadcrumb {
  font-size: 12px;
  color: var(--td-muted);
  padding: 0.5rem 1.5rem;
  background: var(--td-white);
  border-bottom: 1px solid var(--td-border);
}

.td-breadcrumb a {
  color: var(--td-muted);
  text-decoration: none;
}

.td-breadcrumb a:hover {
  color: var(--td-accent);
}

.td-breadcrumb .sep {
  margin: 0 0.3rem;
  color: #cbd5e1;
}
