:root {
  --ts-layer2: #0d2a35;
  --ts-primary: #c85a1e;
  --ts-secondary: #2d7a8a;
  --ts-bg-grad-start: #3a8fa0;
  --ts-bg-grad-end: #0d2a35;
}

html, body { 
  margin: 0; 
  padding: 0; 
}

* { 
  box-sizing: border-box; 
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  line-height: 1.6;
  color: #333;
  background: linear-gradient(135deg, var(--ts-bg-grad-start) 0%, var(--ts-bg-grad-end) 100%) !important;
  min-height: 100vh;
  padding: 20px;
}

header {
  background: linear-gradient(135deg, var(--ts-layer2) 0%, var(--ts-secondary) 100%) !important;
  color: white;
  padding: 40px 30px;
  text-align: center;
}

header h1, header .tagline {
  color: white;
}

.container {
  max-width: 1000px;
  margin: 0 auto;
  background: white;
  border-radius: 12px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
  overflow: hidden;
}

.nav {
  background: #f8f9fa;
  padding: 15px 30px;
  border-bottom: 1px solid #e0e0e0;
}

.nav a {
  color: var(--ts-layer2);
  text-decoration: none;
  font-weight: 600;
  font-size: 1.05em;
}

.nav a:hover {
  text-decoration: underline;
}

.content {
  padding: 40px 30px;
}

h1 {
  font-weight: 700;
  color: inherit;
}

h2 {
  color: var(--ts-layer2);
  margin: 30px 0 15px 0;
  font-size: 1.8em;
  border-bottom: 3px solid var(--ts-primary);
  padding-bottom: 10px;
}

h2:first-child {
  margin-top: 0;
}

h3 {
  color: var(--ts-layer2);
  margin-bottom: 10px;
  font-weight: 600;
}

p {
  margin-bottom: 15px;
  font-size: 1.05em;
  color: #555;
}

ul {
  margin: 15px 0 15px 25px;
}

li {
  margin-bottom: 12px;
  color: #555;
  font-size: 1.05em;
}

strong {
  color: var(--ts-layer2);
  font-weight: 600;
}

code {
  background: #f4f4f4;
  padding: 2px 6px;
  border-radius: 3px;
  font-family: 'Monaco', 'Courier New', monospace;
  font-size: 0.9em;
  color: #c7254e;
}

.tagline {
  font-size: 1.2em;
  opacity: 0.95;
  font-weight: 300;
}

/* Highlight boxes */
.highlight-box,
.info-box,
.source-box,
.tech-stack,
.pipeline-step,
.term,
.no-errors,
.error-item {
  background: #f8f9fa;
  border-left: 4px solid var(--ts-primary);
  padding: 20px;
  margin: 20px 0;
  border-radius: 4px;
}

.term {
  border-left-color: var(--ts-primary);
}

.term-name {
  font-weight: 600;
  color: var(--ts-layer2);
}

.term-definition {
  margin-top: 8px;
  color: #555;
}

/* Buttons & CTAs */
.cta {
  text-align: center;
  margin: 40px 0 20px 0;
  padding: 30px;
  background: linear-gradient(135deg, var(--ts-primary) 0%, var(--ts-secondary) 100%);
  border-radius: 8px;
}

.cta p {
  color: white;
  margin-bottom: 20px;
  font-size: 1.1em;
}

.cta a {
  display: inline-block;
  background: white;
  color: var(--ts-layer2);
  padding: 15px 40px;
  text-decoration: none;
  border-radius: 50px;
  font-weight: 600;
  font-size: 1.1em;
  transition: transform 0.2s, box-shadow 0.2s;
  box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.cta a:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0,0,0,0.3);
}

.btn-primary {
  background: linear-gradient(135deg, var(--ts-secondary) 0%, var(--ts-layer2) 100%);
  color: white;
  padding: 12px 28px;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.3s ease;
  display: inline-block;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 20px rgba(45, 122, 138, 0.3);
}

.btn-secondary {
  background: #f0f0f0;
  color: #333;
  padding: 12px 28px;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.3s ease;
  display: inline-block;
}

.btn-secondary:hover {
  background: #e0e0e0;
}

/* Tables */
.table th, th {
  background: var(--ts-layer2);
  color: #fff;
  padding: 12px;
  text-align: left;
  font-weight: 600;
}

table {
  width: 100%;
  border-collapse: collapse;
  margin: 20px 0;
}

table td {
  padding: 12px;
  border-bottom: 1px solid #eee;
}

table tr:hover {
  background: #f9f9f9;
}

/* Status page specifics */
.status-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 15px;
  margin: 20px 0;
}

.status-card {
  padding: 15px;
  border-radius: 8px;
  border-left: 4px solid;
  background: #f8f9fa;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.status-card.ok {
  border-left-color: #28a745;
  background: #f0f8f4;
}

.status-card.error {
  border-left-color: #dc3545;
  background: #fef5f5;
}

.status-card.warning {
  border-left-color: #ffc107;
  background: #fffbf0;
}

.line-name {
  font-weight: 600;
  color: var(--ts-layer2);
  font-size: 1.05em;
}

.status-indicator {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  display: inline-block;
  margin-left: 10px;
}

.status-indicator.ok {
  background: #28a745;
}

.status-indicator.error {
  background: #dc3545;
}

.status-indicator.warning {
  background: #ffc107;
}

.last-updated {
  font-size: 0.85em;
  color: #666;
  margin-top: 20px;
  text-align: center;
}

.loading {
  text-align: center;
  padding: 40px;
  color: #666;
}

.spinner {
  border: 4px solid #f3f3f3;
  border-top: 4px solid var(--ts-layer2);
  border-radius: 50%;
  width: 40px;
  height: 40px;
  animation: spin 1s linear infinite;
  margin: 0 auto 20px;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.error-list {
  margin: 20px 0;
}

.error-item {
  background: #fef5f5;
  border-left: 4px solid #dc3545;
  padding: 12px;
  margin-bottom: 10px;
  border-radius: 4px;
  font-size: 0.95em;
}

.error-time {
  color: #666;
  font-size: 0.85em;
  margin-bottom: 5px;
}

.error-message {
  color: #dc3545;
  font-weight: 500;
}

.error-context {
  color: #888;
  font-size: 0.85em;
  margin-top: 5px;
}

.no-errors {
  background: #f0f8f4;
  border-left: 4px solid #28a745;
  padding: 15px;
  margin: 20px 0;
  border-radius: 4px;
  color: #28a745;
  font-weight: 500;
}

/* FAQ specific */
.faq-container {
  margin: 20px 0;
}

.faq-item {
  margin-bottom: 20px;
}

.faq-question {
  background: #f8f9fa;
  border-left: 4px solid var(--ts-primary);
  padding: 20px;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
  color: var(--ts-layer2);
  user-select: none;
}

.faq-answer {
  padding: 20px;
  background: #fafbfc;
  border-left: 4px solid #ddd;
  border-radius: 0 8px 8px 0;
  margin-top: 0;
}

/* Links */
a, .link {
  color: var(--ts-layer2);
  text-decoration: underline;
}

a:hover {
  opacity: 0.8;
}

/* Footer */
.site-footer {
  margin-top: 40px;
  background: #f8f9fa;
  border-top: 3px solid var(--ts-primary);
  padding: 24px 0;
}

.site-footer .container {
  background: transparent;
  box-shadow: none;
  border-radius: 0;
}

.footer-inner {
  display: flex;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  padding: 0 30px;
}

.footer-brand {
  color: var(--ts-layer2);
  font-weight: 700;
}

.footer-nav {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

.footer-nav a {
  color: var(--ts-layer2);
  font-weight: 600;
  text-decoration: none;
}

.footer-nav a:hover {
  text-decoration: underline;
}

.footer-copy {
  color: #666;
}

/* Responsive */
@media (max-width: 600px) {
  .container {
    padding: 40px 25px;
  }

  h1 {
    font-size: 24px;
  }

  h2 {
    font-size: 1.5em;
  }

  .actions {
    flex-direction: column;
  }

  a, button {
    width: 100%;
  }

  .footer-inner {
    flex-direction: column;
    gap: 20px;
  }

  .footer-nav {
    justify-content: center;
    width: 100%;
  }
}
