@import url('https://fonts.googleapis.com/css2?family=Lato:wght@400;700&family=Merriweather:wght@700&display=swap');

/* ============================================================
   DIESELROSS.LI — Windows XP Luna Theme Stylesheet
   ============================================================ */

/* ============================================================
   FENDT COLOR PALETTE
   Green accent replaces XP blue in content areas.
   XP chrome (title bar, taskbar, window controls) stays blue.
   Fendt Grün ≈ RAL 6010 / #3E7828
   ============================================================ */
:root {
  --fg:        #3E7828; /* Fendt green – main accent            */
  --fg-dark:   #2A5818; /* dark green – hover/borders            */
  --fg-light:  #5A9640; /* lighter green – gradient tops        */
  --fg-faint:  #EDF4E8; /* very light green tint – backgrounds  */
  --fg-mid:    #C8E0B0; /* medium light – row tint/badges       */
  --fg-text:   #1A4010; /* dark green – headings/link text      */
}

/* Reset */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* Base */
html, body {
  height: 100%;
  font-family: 'Lato', Tahoma, Arial, sans-serif;
  font-size: 11px;
  background-color: var(--fg-dark);
  overflow: hidden;
}

/* ===== XP DESKTOP ===== */
.xp-desktop {
  position: fixed;
  inset: 0;
  background-color: var(--fg-dark);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* Desktop icons (top-left) */
.desktop-icons {
  position: absolute;
  top: 10px;
  left: 10px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  z-index: 10;
}

.desktop-icon {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  width: 72px;
  cursor: pointer;
  text-decoration: none;
}

.desktop-icon-img {
  font-size: 32px;
  filter: drop-shadow(1px 2px 3px rgba(0,0,0,0.5));
}

.desktop-icon-label {
  font-size: 11px;
  color: white;
  text-shadow: 1px 1px 2px rgba(0,0,0,0.9), -1px -1px 2px rgba(0,0,0,0.9);
  text-align: center;
  line-height: 1.3;
  padding: 1px 3px;
}

.desktop-icon:hover .desktop-icon-label {
  background: #316AC5;
  text-decoration: underline;
}

/* ===== XP BROWSER WINDOW ===== */
.xp-browser {
  flex: 1;
  margin: 8px 8px 0 8px;
  display: flex;
  flex-direction: column;
  border-radius: 8px 8px 0 0;
  overflow: hidden;
  box-shadow: 2px 2px 12px rgba(0,0,0,0.6);
  min-height: 0;
  border: 1px solid #0A246A;
  border-bottom: none;
}

/* ---- Title Bar ---- */
.xp-title-bar {
  height: 30px;
  background: linear-gradient(to bottom,
    #5498F5 0%,
    #2577E3 3%,
    #0E5FD0 6%,
    #1464D0 55%,
    #0052BC 95%,
    #003CAA 100%
  );
  display: flex;
  align-items: center;
  padding: 0 6px;
  border-radius: 7px 7px 0 0;
  user-select: none;
  flex-shrink: 0;
  position: relative;
}

.xp-title-bar::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 50%;
  background: linear-gradient(to bottom, rgba(255,255,255,0.18), rgba(255,255,255,0));
  border-radius: 7px 7px 0 0;
  pointer-events: none;
}

.xp-title-icon {
  font-size: 14px;
  margin-right: 6px;
  flex-shrink: 0;
}

.xp-title-text {
  color: white;
  font-size: 12px;
  font-weight: bold;
  text-shadow: 1px 1px 2px rgba(0,0,0,0.6);
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Window Control Buttons */
.xp-window-controls {
  display: flex;
  gap: 2px;
  flex-shrink: 0;
  margin-left: 4px;
}

.xp-btn {
  width: 22px;
  height: 22px;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: bold;
  border-radius: 3px;
  color: white;
  text-shadow: 1px 1px 1px rgba(0,0,0,0.5);
  line-height: 1;
}

.xp-btn-min, .xp-btn-max {
  background: linear-gradient(to bottom,
    #7AB8FF 0%,
    #4A90E8 3%,
    #2878D8 6%,
    #2878D8 95%,
    #1060C8 100%
  );
  border: 1px solid #1A5CC0;
}

.xp-btn-min:hover, .xp-btn-max:hover {
  background: linear-gradient(to bottom,
    #9CCFFF 0%,
    #6AACFF 3%,
    #4898F0 6%,
    #4898F0 95%,
    #2880E0 100%
  );
}

.xp-btn-close {
  background: linear-gradient(to bottom,
    #F08080 0%,
    #D84040 3%,
    #C02020 6%,
    #C02020 95%,
    #A81010 100%
  );
  border: 1px solid #981010;
}

.xp-btn-close:hover {
  background: linear-gradient(to bottom,
    #FF9898 0%,
    #F05050 3%,
    #E03030 6%,
    #E03030 95%,
    #C01818 100%
  );
}

/* ---- Menu Bar ---- */
.xp-menu-bar {
  background: #ECE9D8;
  height: 22px;
  display: flex;
  align-items: center;
  padding: 0 2px;
  border-bottom: 1px solid #ACA899;
  flex-shrink: 0;
}

.xp-menu-item {
  padding: 2px 8px;
  font-size: 11px;
  cursor: pointer;
  color: #000;
  border-radius: 2px;
  height: 18px;
  display: flex;
  align-items: center;
}

.xp-menu-item:hover {
  background: linear-gradient(to bottom, #6DB0F8, #2070D8);
  color: white;
}

.xp-menu-item span {
  text-decoration: underline;
  text-underline-offset: 1px;
}

/* ---- Toolbar / Address Bar ---- */
.xp-toolbar {
  background: #ECE9D8;
  height: 34px;
  display: flex;
  align-items: center;
  padding: 0 6px;
  gap: 4px;
  border-bottom: 2px solid #ACA899;
  flex-shrink: 0;
}

.xp-nav-btn {
  min-width: 32px;
  height: 26px;
  padding: 0 6px;
  background: linear-gradient(to bottom, #FFFFFF 0%, #ECE9D8 100%);
  border: 1px solid #ACA899;
  border-radius: 3px;
  cursor: pointer;
  font-size: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  font-family: Tahoma, sans-serif;
  font-size: 11px;
}

.xp-nav-btn:hover {
  background: linear-gradient(to bottom, #EEF4FF 0%, #C0D8F8 100%);
  border-color: #6090C8;
}

.xp-nav-btn:active {
  background: linear-gradient(to bottom, #C0D8F8 0%, #EEF4FF 100%);
}

.xp-nav-btn-icon {
  font-size: 14px;
}

.xp-toolbar-sep {
  width: 1px;
  height: 22px;
  background: #ACA899;
  margin: 0 2px;
}

.xp-address-label {
  font-size: 11px;
  color: #000;
  white-space: nowrap;
  font-weight: bold;
}

.xp-address-bar {
  flex: 1;
  height: 22px;
  border: 1px solid #7B7B7B;
  border-top-color: #5A5A5A;
  background: white;
  padding: 0 4px;
  font-family: Tahoma, sans-serif;
  font-size: 11px;
  outline: none;
}

.xp-address-bar:focus {
  border-color: #316AC5;
}

.xp-go-btn {
  height: 22px;
  padding: 0 10px;
  background: linear-gradient(to bottom, #FFFFFF 0%, #ECE9D8 100%);
  border: 1px solid #ACA899;
  font-family: Tahoma, sans-serif;
  font-size: 11px;
  cursor: pointer;
  border-radius: 2px;
}

.xp-go-btn:hover {
  background: linear-gradient(to bottom, #EEF4FF 0%, #C0D8F8 100%);
}

/* ---- Browser Content Area ---- */
.xp-browser-content {
  flex: 1;
  display: flex;
  background: #ECE9D8;
  overflow: hidden;
  min-height: 0;
}

/* ---- Left Navigation Pane (Explorer Task Pane style) ---- */
.xp-nav-pane {
  width: 190px;
  flex-shrink: 0;
  background: #EFF3FD;
  border-right: 1px solid #ACA899;
  overflow-y: auto;
  overflow-x: hidden;
}

.xp-nav-section {
  margin-bottom: 1px;
}

.xp-nav-section-header {
  background: linear-gradient(to bottom, var(--fg-light) 0%, var(--fg) 100%);
  color: white;
  font-size: 11px;
  font-weight: bold;
  padding: 5px 8px 5px 10px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--fg-dark);
  user-select: none;
}

.xp-nav-section-arrow {
  font-size: 9px;
  transition: transform 0.15s;
}

.xp-nav-section-header.collapsed .xp-nav-section-arrow {
  transform: rotate(180deg);
}

.xp-nav-section-header:focus-visible {
  outline: 2px solid #FFD700;
  outline-offset: -2px;
}

.xp-nav-links {
  padding: 4px 0 8px 0;
  background: #EFF3FD;
}

.xp-nav-links.hidden {
  display: none;
}

.xp-nav-link {
  display: flex;
  align-items: flex-start;
  padding: 3px 8px 3px 16px;
  font-size: 11px;
  color: var(--fg-text);
  text-decoration: none;
  cursor: pointer;
  gap: 5px;
  line-height: 1.4;
}

.xp-nav-link:hover {
  text-decoration: underline;
  color: var(--fg-dark);
  background: var(--fg-mid);
}

.xp-nav-link.active {
  color: var(--fg-dark);
  font-weight: bold;
  background: var(--fg-faint);
  text-decoration: none;
}

.xp-nav-link-bullet {
  color: var(--fg);
  font-size: 14px;
  line-height: 1;
  flex-shrink: 0;
  margin-top: 1px;
}

/* ---- Main Content Area ---- */
.xp-main-content {
  flex: 1;
  overflow-y: auto;
  overflow-x: auto;
  background: #FFFFFF;
  padding: 0;
  font-family: Tahoma, 'MS Sans Serif', Arial, sans-serif;
  font-size: 12px;
  color: #000000;
}

.content-inner {
  padding: 16px 20px 24px 20px;
}

/* ---- Status Bar ---- */
.xp-status-bar {
  height: 22px;
  background: #ECE9D8;
  border-top: 1px solid #ACA899;
  display: flex;
  align-items: center;
  padding: 0;
  font-size: 11px;
  color: #333;
  flex-shrink: 0;
}

.xp-status-main {
  flex: 1;
  padding: 0 8px;
  border-right: 1px solid #ACA899;
  white-space: nowrap;
  overflow: hidden;
}

.xp-status-zone {
  padding: 0 8px;
  border-right: 1px solid #ACA899;
  white-space: nowrap;
  min-width: 130px;
  text-align: center;
}

.xp-status-icon {
  padding: 0 6px;
  font-size: 13px;
  border-right: 1px solid #ACA899;
}

/* ===== XP TASKBAR ===== */
.xp-taskbar {
  height: 38px;
  background: linear-gradient(to bottom,
    #1F5FA6 0%,
    #0A246A 1%,
    #1D5FA4 40%,
    #1D5FA4 98%,
    #0A246A 100%
  );
  display: flex;
  align-items: center;
  padding: 0 4px;
  gap: 4px;
  flex-shrink: 0;
  z-index: 100;
}

.xp-start-btn {
  height: 30px;
  padding: 0 14px 0 8px;
  background: linear-gradient(to bottom,
    #76B243 0%,
    #5BAE1E 2%,
    #3C9610 3%,
    #3C9610 97%,
    #2E7A08 100%
  );
  border: none;
  border-radius: 0 15px 15px 0;
  color: white;
  font-size: 14px;
  font-weight: bold;
  font-family: Tahoma, sans-serif;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  text-shadow: 1px 1px 2px rgba(0,0,0,0.6);
  box-shadow: 2px 0 4px rgba(0,0,0,0.3);
  letter-spacing: 0.5px;
}

.xp-start-btn:hover {
  background: linear-gradient(to bottom,
    #90C860 0%,
    #72C030 2%,
    #52A818 3%,
    #52A818 97%,
    #3C8A10 100%
  );
}

.xp-taskbar-sep {
  width: 1px;
  height: 26px;
  background: linear-gradient(to bottom, rgba(255,255,255,0.1), rgba(255,255,255,0.4), rgba(255,255,255,0.1));
  margin: 0 4px;
}

.xp-taskbar-apps {
  display: flex;
  gap: 2px;
  flex: 1;
}

.xp-taskbar-app {
  height: 26px;
  min-width: 140px;
  max-width: 220px;
  padding: 0 10px;
  background: linear-gradient(to bottom,
    #4A88D0 0%,
    #1A60B0 2%,
    #1D5FA4 95%,
    #0A3880 100%
  );
  border: 1px solid #0A246A;
  border-top-color: #4880C0;
  color: white;
  font-size: 11px;
  font-family: Tahoma, sans-serif;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  text-overflow: ellipsis;
  overflow: hidden;
  white-space: nowrap;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.25);
  text-shadow: 1px 1px 1px rgba(0,0,0,0.5);
}

.xp-systray {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 8px;
  height: 28px;
  background: linear-gradient(to bottom,
    #1058A0 0%,
    #0A3878 2%,
    #0D4898 95%,
    #062868 100%
  );
  border: 1px solid #0A3070;
  border-top-color: #2070A8;
  border-left-color: #2070A8;
}

.xp-systray-icon {
  font-size: 14px;
  cursor: default;
}

.xp-clock {
  font-family: Tahoma, sans-serif;
  font-size: 11px;
  color: white;
  text-align: center;
  white-space: nowrap;
  cursor: default;
}

/* ===== CONTENT TYPOGRAPHY & COMPONENTS ===== */

/* Page header banner */
.page-header {
  background: linear-gradient(to right, var(--fg-faint) 0%, #DCF0D0 40%, #FFFFFF 100%);
  border-bottom: 2px solid var(--fg);
  padding: 12px 20px 10px 20px;
}

.page-header h1 {
  font-family: 'Merriweather', Georgia, serif;
  font-size: 18px;
  color: var(--fg-text);
  font-weight: 700;
  margin-bottom: 2px;
}

.page-header-sub {
  font-size: 11px;
  color: #555;
}

/* Section headings */
h2 {
  font-family: 'Merriweather', Georgia, serif;
  font-size: 14px;
  color: var(--fg-text);
  margin: 20px 0 8px 0;
  padding-bottom: 4px;
  border-bottom: 1px solid #A8C890;
}

h3 {
  font-family: 'Merriweather', Georgia, serif;
  font-size: 12px;
  color: var(--fg-dark);
  margin: 14px 0 6px 0;
}

p {
  margin-bottom: 8px;
  line-height: 1.55;
}

/* Info boxes */
.xp-infobox {
  background: var(--fg-faint);
  border: 1px solid #90B870;
  border-left: 4px solid var(--fg);
  padding: 10px 14px;
  margin: 12px 0;
}

.xp-infobox-title {
  font-weight: bold;
  color: var(--fg-text);
  margin-bottom: 5px;
  font-size: 12px;
}

.xp-notebox {
  background: #FFFAE8;
  border: 1px solid #E8C840;
  border-left: 4px solid #C8A000;
  padding: 10px 14px;
  margin: 12px 0;
}

/* Tables */
.xp-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 11px;
  margin: 8px 0 16px 0;
}

.xp-table th {
  background: linear-gradient(to bottom, var(--fg-light) 0%, var(--fg) 100%);
  color: white;
  padding: 5px 10px;
  text-align: left;
  font-weight: bold;
  border: 1px solid var(--fg-dark);
}

.xp-table td {
  padding: 5px 10px;
  border: 1px solid #D0C8C0;
  vertical-align: top;
}

.xp-table tr:nth-child(even) td {
  background: #F2F8EE;
}

.xp-table tr:nth-child(odd) td {
  background: #FFFFFF;
}

.xp-table tr:hover td {
  background: var(--fg-mid);
}

.xp-table td:first-child {
  font-weight: bold;
  color: #333;
  width: 40%;
}

/* Image placeholders — aspect-ratio 4:3 so layout is preserved when real
   <img> elements replace these divs (prevents cumulative layout shift) */
.img-placeholder {
  background: linear-gradient(135deg, #C0C4CC 0%, #D0D4DC 50%, #B8BCC4 100%);
  border: 1px inset #A0A4AC;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #505458;
  text-align: center;
  padding: 12px 8px;
  aspect-ratio: 4 / 3;
  min-height: 90px;
  position: relative;
  /* width: 100% + max-width: 100% keep the placeholder inside its grid/flex cell.
     No max-height: letting aspect-ratio govern height avoids the visual glitch where
     max-height would clamp the height without correspondingly shrinking the width. */
  width: 100%;
  max-width: 100%;
  overflow: hidden;
}

.img-placeholder-icon {
  font-size: 36px;
  opacity: 0.55;
  margin-bottom: 8px;
}

.img-placeholder-text {
  font-size: 11px;
  font-weight: bold;
  margin-bottom: 3px;
}

.img-placeholder-caption {
  font-size: 10px;
  color: #707478;
  font-style: italic;
}

/* Image grid layouts */
.img-grid {
  display: grid;
  gap: 10px;
  margin: 12px 0;
}

.img-grid-2 { grid-template-columns: 1fr 1fr; }
.img-grid-3 { grid-template-columns: 1fr 1fr 1fr; }
.img-grid-4 { grid-template-columns: 1fr 1fr 1fr 1fr; }

/* Prevent grid/flex items from overflowing their allocated space.
   Without min-width:0, fr-sized cells can expand to fit intrinsic content
   (e.g. aspect-ratio derived min-widths), causing horizontal overflow. */
.img-grid > *,
.featured-image-row > *,
.history-section > *,
.history-images > * {
  min-width: 0;
}

/* Document list */
.doc-list {
  list-style: none;
  border: 1px solid #D0C8C0;
  margin: 8px 0 16px 0;
}

.doc-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-bottom: 1px solid #E0D8D0;
  cursor: pointer;
}

.doc-item:last-child {
  border-bottom: none;
}

.doc-item:hover {
  background: var(--fg-faint);
}

.doc-item:nth-child(even) {
  background: #F8F8F8;
}

.doc-item:nth-child(even):hover {
  background: #EFF3FD;
}

.doc-icon {
  font-size: 24px;
  flex-shrink: 0;
}

.doc-info {
  flex: 1;
}

.doc-name {
  font-weight: bold;
  color: var(--fg-text);
  font-size: 12px;
  margin-bottom: 2px;
}

.doc-name:hover {
  text-decoration: underline;
}

.doc-meta {
  font-size: 10px;
  color: #666;
}

.doc-placeholder-tag {
  font-size: 10px;
  color: #999;
  background: #F0F0F0;
  border: 1px solid #DDD;
  padding: 1px 6px;
  border-radius: 2px;
  font-style: italic;
}

/* ===== HOME PAGE ===== */

.intro-panel {
  background: linear-gradient(to right, var(--fg-faint), #F8FFF4);
  border: 1px solid #90B870;
  padding: 16px 18px;
  margin-bottom: 16px;
  display: flex;
  gap: 16px;
  align-items: flex-start;
}

.intro-tractor-icon {
  font-size: 56px;
  flex-shrink: 0;
  filter: drop-shadow(2px 2px 4px rgba(0,0,0,0.2));
}

.intro-text h2 {
  margin: 0 0 6px 0;
  font-size: 16px;
  border: none;
  padding: 0;
}

.facts-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  border: 1px solid #90B870;
  margin: 14px 0;
  overflow: hidden;
}

.fact-cell {
  background: white;
  padding: 10px 12px;
  text-align: center;
  border-right: 1px solid #C0D8A8;
}

.fact-cell:last-child {
  border-right: none;
}

.fact-value {
  font-size: 22px;
  font-weight: bold;
  color: var(--fg-text);
  display: block;
  margin-bottom: 2px;
}

.fact-label {
  font-size: 10px;
  color: #666;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.home-cards {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 10px;
  margin: 16px 0;
}

.home-card {
  border: 1px solid #A0C080;
  background: linear-gradient(to bottom, #F4F9F0 0%, #FFFFFF 100%);
  padding: 14px;
  text-decoration: none;
  color: inherit;
  display: block;
  transition: none;
}

.home-card:hover {
  border-color: var(--fg);
  background: linear-gradient(to bottom, #D8ECC8 0%, #F2F9EE 100%);
}

.home-card-icon {
  font-size: 36px;
  display: block;
  margin-bottom: 8px;
}

.home-card-title {
  font-weight: bold;
  color: var(--fg-text);
  font-size: 13px;
  margin-bottom: 5px;
  display: block;
}

.home-card-desc {
  font-size: 11px;
  color: #444;
  line-height: 1.45;
}

.featured-image-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin: 16px 0;
}

/* Featured row uses 16:9 aspect ratio to match actual photo format.
   min-height ensures images are never too short on narrow screens. */
.featured-image-row .img-placeholder {
  aspect-ratio: 16 / 9;
  min-height: 160px;
  max-height: unset;
}

/* ===== ÜBER DEN TRAKTOR PAGE ===== */

.history-section {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin: 12px 0;
}

.history-text {
  line-height: 1.6;
}

.history-images {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* ===== RESTAURIERUNG / TIMELINE ===== */

.timeline {
  position: relative;
  padding-left: 28px;
  margin: 16px 0;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 10px;
  top: 8px;
  bottom: 8px;
  width: 2px;
  background: linear-gradient(to bottom, var(--fg), #A0C890);
}

.timeline-item {
  position: relative;
  margin-bottom: 14px;
}

.timeline-dot {
  position: absolute;
  left: -22px;
  top: 8px;
  width: 14px;
  height: 14px;
  background: linear-gradient(135deg, #80B060, var(--fg));
  border: 2px solid white;
  border-radius: 50%;
  box-shadow: 0 0 0 1px var(--fg);
  z-index: 1;
}

.timeline-dot.done {
  background: linear-gradient(135deg, #70C050, #3A9010);
  box-shadow: 0 0 0 1px #3A9010;
}

.timeline-dot.active {
  background: linear-gradient(135deg, #F0B040, #D08010);
  box-shadow: 0 0 0 1px #C07808;
}

.timeline-header {
  background: linear-gradient(to right, var(--fg-faint) 0%, #F8FFF4 100%);
  border: 1px solid #A8C890;
  border-left: 4px solid var(--fg);
  padding: 7px 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  user-select: none;
}

.timeline-header:hover {
  background: linear-gradient(to right, #D0ECC0 0%, var(--fg-faint) 100%);
}

.timeline-header:focus-visible {
  outline: 2px solid #1464D0;
  outline-offset: 1px;
}

.timeline-phase-badge {
  font-size: 10px;
  color: #3A3A3A;
  background: var(--fg-mid);
  padding: 1px 7px;
  border-radius: 10px;
  flex-shrink: 0;
  font-weight: bold;
}

.timeline-title {
  font-weight: bold;
  font-size: 12px;
  color: var(--fg-text);
  flex: 1;
  margin: 0 10px;
}

.timeline-status {
  font-size: 10px;
  padding: 2px 8px;
  border-radius: 2px;
  flex-shrink: 0;
}

.status-done {
  background: #CCFFCC;
  color: #006600;
  border: 1px solid #009900;
}

.status-wip {
  background: #FFF0CC;
  color: #806600;
  border: 1px solid #CC9900;
}

.status-planned {
  background: #EEEEEE;
  color: #555;
  border: 1px solid #AAAAAA;
}

.timeline-body {
  padding: 12px 16px;
  background: #FAFEF8;
  border: 1px solid #A8C890;
  border-top: none;
  border-left: 4px solid #B8D8A0;
  display: none;
}

.timeline-body.open {
  display: block;
}

.timeline-body p {
  font-size: 11px;
  color: #333;
  margin-bottom: 8px;
}

.timeline-body-images {
  margin-top: 10px;
}

.timeline-toggle-arrow {
  font-size: 10px;
  color: #555;
  transition: transform 0.15s;
}

.timeline-header.open .timeline-toggle-arrow {
  transform: rotate(180deg);
}

/* Übersicht summary card */
.restaurierung-intro {
  background: linear-gradient(to right, var(--fg-faint), #F8FFF4);
  border: 1px solid #90B870;
  padding: 14px 18px;
  margin-bottom: 16px;
  display: flex;
  gap: 20px;
  align-items: flex-start;
}

.restaurierung-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  font-size: 11px;
  flex-shrink: 0;
}

.restaurierung-stat {
  background: white;
  border: 1px solid #B0D090;
  padding: 6px 10px;
}

.restaurierung-stat-label {
  color: #555;
  font-size: 10px;
}

.restaurierung-stat-value {
  font-weight: bold;
  color: var(--fg-text);
  font-size: 12px;
}

/* ===== GALERIE PAGE ===== */

.galerie-section {
  margin-bottom: 24px;
}

.galerie-section-header {
  background: linear-gradient(to right, var(--fg-faint), #DCF0D0);
  border: 1px solid #A8C890;
  border-left: 4px solid var(--fg);
  padding: 8px 14px;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.galerie-section-icon {
  font-size: 16px;
}

.galerie-section-title {
  font-weight: bold;
  font-size: 13px;
  color: var(--fg-text);
}

.galerie-section-count {
  font-size: 10px;
  color: #666;
  margin-left: auto;
}

.galerie-img-placeholder {
  background: linear-gradient(135deg, #B8BCC4, #C8CCD4, #B0B4BC);
  border: 1px solid #A0A4AC;
  aspect-ratio: 4/3;
  max-height: 300px;
  width: 100%;
  max-width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #505458;
  text-align: center;
  padding: 8px;
  cursor: pointer;
  transition: none;
}

.galerie-img-placeholder:hover {
  border-color: var(--fg);
  background: linear-gradient(135deg, #B0C4A8, #C0D8B0, #A8BCA0);
}

.galerie-img-placeholder-icon {
  font-size: 28px;
  opacity: 0.55;
  margin-bottom: 6px;
}

.galerie-img-placeholder-label {
  font-size: 10px;
  color: #606468;
}

/* ===== 404 ERROR PAGE ===== */

.xp-error-dialog {
  background: #ECE9D8;
  border: 2px solid #0A246A;
  border-radius: 8px 8px 4px 4px;
  box-shadow: 3px 3px 10px rgba(0,0,0,0.35);
  max-width: 520px;
  margin: 24px auto;
}

.xp-error-dialog-title-bar {
  height: 30px;
  background: linear-gradient(to bottom,
    #5498F5 0%,
    #2577E3 3%,
    #0E5FD0 6%,
    #1464D0 55%,
    #0052BC 95%,
    #003CAA 100%
  );
  display: flex;
  align-items: center;
  padding: 0 6px;
  border-radius: 7px 7px 0 0;
  gap: 6px;
  user-select: none;
}

.xp-error-dialog-icon {
  font-size: 14px;
}

.xp-error-dialog-title {
  flex: 1;
  color: white;
  font-weight: bold;
  font-size: 12px;
  text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
}

.xp-error-dialog-close {
  margin-left: auto;
}

.xp-error-dialog-body {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 18px 20px;
}

.xp-error-dialog-icon-large {
  font-size: 40px;
  flex-shrink: 0;
  line-height: 1;
}

.xp-error-dialog-message {
  font-size: 11px;
  line-height: 1.6;
  flex: 1;
}

.xp-error-dialog-message p {
  margin: 0 0 8px 0;
}

.xp-error-dialog-message p:last-child {
  margin-bottom: 0;
}

.xp-error-dialog-buttons {
  display: flex;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px 16px;
  border-top: 1px solid #C0B8B0;
}

.xp-dialog-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 90px;
  height: 23px;
  padding: 0 14px;
  background: linear-gradient(to bottom, #F0F0E8 0%, #DEDAD0 100%);
  border: 1px solid #7B7B6B;
  border-top-color: #E0DCD4;
  border-left-color: #E0DCD4;
  font-family: Tahoma, sans-serif;
  font-size: 11px;
  cursor: pointer;
  text-decoration: none;
  color: #000;
}

.xp-dialog-btn:hover {
  background: linear-gradient(to bottom, #EEF4FF 0%, #C0D8F8 100%);
  border-color: #6090C8;
}

.xp-dialog-btn:active {
  background: linear-gradient(to bottom, #C0D8F8 0%, #EEF4FF 100%);
}

.xp-dialog-btn:focus-visible {
  outline: 1px dotted #000;
  outline-offset: 1px;
}

.xp-404-tips {
  margin: 12px 0;
  font-size: 11px;
}

.xp-404-tips-title {
  font-weight: bold;
  font-size: 13px;
  color: var(--fg-text);
  margin-bottom: 10px;
  padding-bottom: 4px;
  border-bottom: 1px solid #C0D0EC;
}

.xp-404-tips-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.xp-404-tips-list li {
  padding: 6px 10px;
  background: #F4F9F0;
  border-left: 3px solid var(--fg);
}

.xp-404-tips-list a {
  color: var(--fg-text);
  margin-left: 4px;
}

.xp-404-tips-list a:hover {
  text-decoration: underline;
}

/* ===== GALLERY LIGHTBOX ===== */

.xp-lightbox-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(0, 0, 0, 0.78);
  display: flex;
  align-items: center;
  justify-content: center;
}

.xp-lightbox-overlay[hidden] {
  display: none;
}

.xp-lightbox-window {
  background: #ECE9D8;
  border: 2px solid #0A246A;
  border-radius: 8px 8px 4px 4px;
  box-shadow: 4px 4px 16px rgba(0,0,0,0.7);
  display: flex;
  flex-direction: column;
  width: min(600px, 92vw);
  max-height: 90vh;
  overflow: hidden;
}

.xp-lightbox-title-bar {
  height: 30px;
  background: linear-gradient(to bottom,
    #5498F5 0%,
    #2577E3 3%,
    #0E5FD0 6%,
    #1464D0 55%,
    #0052BC 95%,
    #003CAA 100%
  );
  display: flex;
  align-items: center;
  padding: 0 6px;
  border-radius: 7px 7px 0 0;
  gap: 6px;
  user-select: none;
  flex-shrink: 0;
}

.xp-lightbox-title-icon {
  font-size: 14px;
}

.xp-lightbox-title-text {
  flex: 1;
  color: white;
  font-weight: bold;
  font-size: 12px;
  text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.xp-lightbox-close {
  margin-left: auto;
  flex-shrink: 0;
}

.xp-lightbox-body {
  display: flex;
  align-items: center;
  gap: 0;
  background: #2A2A2A;
  flex: 1;
  min-height: 0;
}

.xp-lightbox-content {
  flex: 1;
  min-height: 280px;
  max-height: 60vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.xp-lightbox-img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  display: block;
}

.xp-lightbox-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 24px;
  text-align: center;
}

.xp-lightbox-ph-icon {
  font-size: 64px;
  opacity: 0.45;
}

.xp-lightbox-ph-text {
  font-size: 15px;
  font-weight: bold;
  color: #C8CCD4;
}

.xp-lightbox-ph-note {
  font-size: 11px;
  color: #888;
  font-style: italic;
}

.xp-lightbox-prev,
.xp-lightbox-next {
  width: 38px;
  min-width: 38px;
  height: 100%;
  background: linear-gradient(to bottom, #404040, #303030);
  border: none;
  border-right: 1px solid #555;
  color: #CCC;
  font-size: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.1s;
  flex-shrink: 0;
}

.xp-lightbox-next {
  border-right: none;
  border-left: 1px solid #555;
}

.xp-lightbox-prev:hover,
.xp-lightbox-next:hover {
  background: linear-gradient(to bottom, var(--fg), var(--fg-dark));
  color: white;
}

.xp-lightbox-prev:disabled,
.xp-lightbox-next:disabled {
  color: #555;
  cursor: default;
  background: linear-gradient(to bottom, #303030, #282828);
}

.xp-lightbox-caption {
  background: #ECE9D8;
  border-top: 1px solid #ACA899;
  padding: 6px 14px;
  font-size: 11px;
  color: #333;
  min-height: 26px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex-shrink: 0;
}

.galerie-img-placeholder:focus-visible {
  outline: 2px solid var(--fg);
  outline-offset: 2px;
}

/* ============================================================
   MOBILE RESPONSIVE LAYOUT  (max-width: 768px)
   The desktop layout uses position:fixed + overflow:hidden to
   simulate the Windows XP shell. On mobile we switch to normal
   document flow: the whole page scrolls, chrome is simplified,
   and the nav pane becomes a horizontal tab strip.
   Desktop styles above this block are NEVER touched.
   ============================================================ */

/* ===== TABLET / NARROW DESKTOP (960px) ===================================
   Collapses the history-section two-column layout on the "Über den F12"
   page before images become too cramped. At 768px the full mobile layout
   takes over and handles everything else.
   ========================================================================= */
@media (max-width: 960px) {

  .history-section {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  /* Revert column order so text always comes first visually when stacked */
  .history-section .history-images {
    order: 1;
  }

  .history-section .history-text {
    order: 0;
  }

  /* Give img-grid-3 two columns at this width so text is readable */
  .img-grid-3 {
    grid-template-columns: 1fr 1fr 1fr;
  }

}

@media (max-width: 768px) {

  /* ── Allow normal browser scroll; clip horizontal overflow ── */
  html, body {
    overflow-x: hidden;
    overflow-y: auto;
    height: auto;
    font-size: 13px;
  }

  /* ── Desktop wrapper: leave fixed position, become normal flow ── */
  .xp-desktop {
    position: relative;
    inset: auto;
    height: auto;
    min-height: 100vh;
    overflow: visible;
    display: block;
  }

  /* ── Browser window: flush to edges, no XP window chrome ── */
  .xp-browser {
    margin: 0;
    border-radius: 0;
    border: none;
    box-shadow: none;
    height: auto;
    flex: none;
    min-height: 0;
    display: flex;
    flex-direction: column;
  }

  /* ── Title bar: becomes a sticky page header ── */
  .xp-title-bar {
    height: 48px;
    border-radius: 0;
    position: sticky;
    top: 0;
    z-index: 50;
    flex-shrink: 0;
    padding: 0 14px;
  }

  .xp-title-icon {
    font-size: 18px;
    margin-right: 8px;
  }

  .xp-title-text {
    font-size: 13px;
  }

  /* Window buttons are decorative on desktop; hide on mobile */
  .xp-window-controls {
    display: none;
  }

  /* ── Hide decorative chrome elements ── */
  .xp-menu-bar,
  .xp-toolbar,
  .xp-taskbar {
    display: none;
  }

  /* ── Browser content: stack nav above main ── */
  .xp-browser-content {
    flex-direction: column;
    overflow: visible;
    height: auto;
    flex: none;
    min-height: 0;
  }

  /* ── Nav pane → horizontal tab strip ── */
  .xp-nav-pane {
    width: 100%;
    height: auto;
    border-right: none;
    border-bottom: 2px solid var(--fg);
    overflow-x: auto;
    overflow-y: visible;
    background: #EFF3FD;
    display: block;
    flex-shrink: 0;
    -webkit-overflow-scrolling: touch;
  }

  /* Show only the first nav section (main page links);
     hide secondary sections (on-this-page anchors, phase lists, legend) */
  .xp-nav-section:not(:first-child) {
    display: none;
  }

  /* Hide the "Navigation" label header — tabs speak for themselves */
  .xp-nav-section:first-child .xp-nav-section-header {
    display: none;
  }

  /* Links as a horizontal flex row.
     Override the .hidden class so JS collapse state is ignored on mobile. */
  .xp-nav-section:first-child .xp-nav-links,
  .xp-nav-section:first-child .xp-nav-links.hidden {
    display: flex !important;
    flex-direction: row;
    padding: 0;
    background: #EFF3FD;
    white-space: nowrap;
  }

  .xp-nav-link {
    padding: 12px 16px;
    font-size: 13px;
    border-right: 1px solid #C8CCE0;
    border-bottom: 3px solid transparent;
    flex-shrink: 0;
    white-space: nowrap;
    min-height: 44px;
    align-items: center;
  }

  .xp-nav-link.active {
    background: var(--fg-faint);
    border-bottom-color: var(--fg);
  }

  .xp-nav-link-bullet {
    display: none;
  }

  /* ── Main content: natural document flow ── */
  .xp-main-content {
    overflow: visible;
    height: auto;
    flex: none;
    font-size: 14px;
  }

  /* ── Status bar: only the Impressum link ── */
  .xp-status-bar {
    height: 34px;
  }

  .xp-status-main,
  .xp-status-zone {
    display: none;
  }

  .xp-status-impressum {
    font-size: 12px;
    border-right: none;
    padding: 0 14px;
  }

  /* ── Content spacing ── */
  .content-inner {
    padding: 12px 14px 28px 14px;
    overflow-x: hidden;
  }

  .page-header {
    padding: 10px 14px 8px 14px;
  }

  .page-header h1 {
    font-size: 18px;
  }

  .page-header-sub {
    font-size: 12px;
  }

  h2 {
    font-size: 15px;
    margin: 16px 0 8px 0;
  }

  h3 {
    font-size: 13px;
  }

  p {
    font-size: 13px;
  }

  /* ── Home page ── */
  .intro-panel {
    flex-direction: column;
    gap: 10px;
  }

  .intro-tractor-icon {
    font-size: 44px;
  }

  .facts-strip {
    grid-template-columns: 1fr 1fr;
  }

  /* bottom border between top and bottom rows */
  .fact-cell:nth-child(-n+2) {
    border-bottom: 1px solid #C0D8A8;
  }

  .fact-value {
    font-size: 20px;
  }

  .home-cards {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .featured-image-row {
    grid-template-columns: 1fr;
  }

  /* ── Über den Traktor ── */
  .history-section {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  /* ── Image grids: collapse to single column on mobile ── */
  .img-grid-2 {
    grid-template-columns: 1fr;
  }

  .img-grid-3 {
    grid-template-columns: 1fr 1fr;
  }

  .img-grid-4 {
    grid-template-columns: 1fr 1fr;
  }

  /* ── Tables: horizontal scroll ── */
  .xp-table {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .xp-table td,
  .xp-table th {
    white-space: nowrap;
  }

  /* ── Document list ── */
  .doc-item {
    flex-wrap: wrap;
    gap: 6px;
  }

  .doc-placeholder-tag {
    margin-left: 0;
  }

  /* ── Restaurierung overview card ── */
  .restaurierung-intro {
    flex-direction: column;
    gap: 12px;
  }

  .restaurierung-stats {
    width: 100%;
    grid-template-columns: 1fr 1fr;
  }

  /* ── Timeline ── */
  .timeline {
    padding-left: 20px;
  }

  .timeline-dot {
    left: -18px;
  }

  .timeline-header {
    gap: 6px;
    padding: 10px 12px;
    min-height: 44px;
  }

  /* Status badge (Done/WIP) takes up too much space on small screens */
  .timeline-status {
    display: none;
  }

  .timeline-title {
    font-size: 12px;
  }

  .timeline-body {
    padding: 10px 12px;
  }

  /* ── Galerie ── */
  .galerie-section-title {
    font-size: 12px;
  }

  /* ── Info/note boxes ── */
  .xp-infobox,
  .xp-notebox {
    font-size: 12px;
  }

  /* ── 404 error dialog ── */
  .xp-error-dialog {
    margin: 12px;
    max-width: calc(100% - 24px);
  }

  /* ── Lightbox ── */
  .xp-lightbox-window {
    width: 95vw;
  }

  .xp-lightbox-prev,
  .xp-lightbox-next {
    width: 44px;
    min-width: 44px;
  }

} /* end @media (max-width: 768px) */

/* ===== SCROLLBAR ===== */

::-webkit-scrollbar {
  width: 16px;
  height: 16px;
}

::-webkit-scrollbar-track {
  background: #D4D0C8;
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(to right, #E0DCD4, #C4C0B8, #E0DCD4);
  border: 1px solid #969290;
}

::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(to right, #D4D0C8, #B8B4AC, #D4D0C8);
}

::-webkit-scrollbar-button:start:decrement,
::-webkit-scrollbar-button:end:increment {
  display: block;
  height: 16px;
  width: 16px;
  background: #D4D0C8;
  border: 1px solid #969290;
}

::-webkit-scrollbar-corner {
  background: #D4D0C8;
}

/* ===== UTILITY ===== */

.placeholder-tag {
  display: inline-block;
  background: #FFF8E8;
  border: 1px solid #E8C840;
  color: #806000;
  font-size: 10px;
  padding: 1px 6px;
  border-radius: 2px;
  font-style: italic;
  margin-left: 6px;
}

/* Impressum placeholder fields */
.impressum-placeholder {
  display: inline-block;
  background: #FFF8E8;
  border: 1px dashed #C8A000;
  color: #806000;
  font-size: 10px;
  padding: 1px 6px;
  border-radius: 2px;
  font-style: italic;
}

/* Status bar Impressum link */
.xp-status-impressum {
  padding: 0 8px;
  border-right: 1px solid #ACA899;
  white-space: nowrap;
  font-size: 11px;
}

.xp-status-impressum a {
  color: var(--fg-text);
  text-decoration: none;
}

.xp-status-impressum a:hover {
  text-decoration: underline;
  color: var(--fg-dark);
}

.separator {
  height: 1px;
  background: linear-gradient(to right, transparent, #C0C8DC, transparent);
  margin: 16px 0;
}

/* ===== PASSWORD OVERLAY ===== */

#xp-pw-overlay {
  position: fixed;
  inset: 0;
  z-index: 99999;
  background: #3A6EA5;
  display: flex;
  align-items: center;
  justify-content: center;
}

.xp-pw-dialog {
  background: #ECE9D8;
  border: 2px solid #0A246A;
  border-radius: 8px 8px 4px 4px;
  width: 340px;
  box-shadow: 4px 4px 12px rgba(0,0,0,0.6);
}

.xp-pw-title-bar {
  height: 30px;
  background: linear-gradient(to bottom,
    #5498F5 0%,
    #2464D4 3%,
    #1454C8 6%,
    #1060D8 90%,
    #0848A8 100%
  );
  border-radius: 6px 6px 0 0;
  display: flex;
  align-items: center;
  padding: 0 6px;
  gap: 6px;
  user-select: none;
}

.xp-pw-title-icon {
  color: white;
  font-size: 13px;
}

.xp-pw-title-text {
  flex: 1;
  color: white;
  font-weight: bold;
  font-size: 12px;
  text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
}

.xp-pw-body {
  padding: 18px 20px 10px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.xp-pw-info {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}

.xp-pw-lock-icon {
  font-size: 30px;
  color: var(--fg);
  flex-shrink: 0;
  margin-top: 2px;
}

.xp-pw-info-text {
  font-size: 12px;
  line-height: 1.5;
  color: #000;
}

.xp-pw-info-text strong {
  display: block;
  margin-bottom: 3px;
  font-size: 13px;
}

.xp-pw-field {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
}

.xp-pw-field label {
  min-width: 72px;
  text-align: right;
  color: #000;
}

.xp-pw-field input {
  flex: 1;
  height: 22px;
  border: 1px solid #7A7A9A;
  border-top-color: #444;
  border-left-color: #444;
  background: white;
  font-size: 12px;
  padding: 0 4px;
  font-family: inherit;
  outline: none;
}

.xp-pw-field input:focus {
  border-color: #0050A0;
}

.xp-pw-error {
  font-size: 11px;
  color: #C00000;
  min-height: 14px;
  text-align: center;
}

.xp-pw-buttons {
  display: flex;
  justify-content: center;
  gap: 8px;
  padding: 6px 20px 14px;
  border-top: 1px solid #C0B8B0;
  margin-top: 4px;
}

@keyframes xp-pw-shake {
  0%, 100% { transform: translateX(0); }
  20%, 60% { transform: translateX(-7px); }
  40%, 80% { transform: translateX(7px); }
}

.xp-pw-shake {
  animation: xp-pw-shake 0.4s ease;
}
