:root {
  /* Color Palette - Professional Technical System */
  --primary: #0f172a; /* Slate 900 */
  --primary-light: #1e293b; /* Slate 800 */
  --accent: #2563eb; /* Royal Blue */
  --accent-hover: #1d4ed8;
  --success: #10b981; /* Emerald */
  --success-hover: #059669;
  --warning: #f59e0b; /* Amber */
  --danger: #ef4444; /* Red */
  
  --bg-body: #f8fafc; /* Slate 50 */
  --bg-card: #ffffff;
  
  --text-main: #1f2937; /* Gray 800 */
  --text-secondary: #64748b; /* Slate 500 */
  --text-inverse: #ffffff;
  
  --border-color: #e2e8f0; /* Slate 200 */
  --input-focus-ring: rgba(37, 99, 235, 0.2);
  
  /* Spacing & Sizes */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

/* Tema: claro/escuro (via body.theme-dark) */
body.theme-dark {
  --primary: #0b1220;
  --primary-light: #111827;
  --accent: #60a5fa;
  --accent-hover: #3b82f6;
  --success: #34d399;
  --success-hover: #10b981;
  --warning: #fbbf24;
  --danger: #f87171;

  --bg-body: #0b1220;
  --bg-card: #0f172a;

  --text-main: #e5e7eb;
  --text-secondary: #94a3b8;
  --text-inverse: #ffffff;

  --border-color: #1f2937;
  --input-focus-ring: rgba(96, 165, 250, 0.25);
}

/* Base Reset */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  height: 100%;
  overflow-x: hidden;
}

body {
  font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background-color: var(--bg-body);
  color: var(--text-main);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  overflow-x: hidden;
}

/* Global Responsive Images */
img {
  max-width: 100%;
  height: auto;
}

/* ==============================
   Manual page (scoped styles)
   ============================== */

.manual-page .manual-section {
  margin-top: 28px;
}

.manual-page .manual-muted {
  color: var(--text-secondary);
}

.manual-page .manual-mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  background: #f1f5f9;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 2px 6px;
  font-size: 0.9em;
}

.manual-page .manual-callout {
  border: 1px solid #bfdbfe;
  background: #eff6ff;
  border-radius: var(--radius-lg);
  padding: 14px 14px;
}

.manual-page .manual-callout-title {
  font-weight: 700;
  color: #1e3a8a;
  margin-bottom: 6px;
}

.manual-page .manual-callout-body {
  color: #1e293b;
}

.manual-page .manual-toc {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.manual-page .manual-toc a {
  padding: 10px 12px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  background: #ffffff;
  color: var(--text-main);
  font-weight: 600;
}

.manual-page .manual-toc a:hover {
  border-color: #bfdbfe;
  background: #eff6ff;
  color: #1e3a8a;
}

.manual-page .manual-figure {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: 12px;
}

/* Photos in the manual (operator / apparatus): keep them visually smaller */
.manual-page .manual-figure.manual-figure--photo {
  max-width: 760px;
  margin-left: auto;
  margin-right: auto;
}

.manual-page .manual-figure img {
  width: 100%;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
}

.manual-page .manual-figure.manual-figure--photo img {
  max-height: 440px;
  object-fit: contain;
}

.manual-page .manual-figure figcaption {
  margin-top: 10px;
  color: var(--text-secondary);
  font-size: 0.875rem;
}

.manual-page .manual-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.manual-page .manual-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid var(--border-color);
  background: #ffffff;
  font-weight: 700;
  font-size: 0.9rem;
}

.manual-page .manual-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
}

.manual-page .manual-table {
  width: 100%;
  border-collapse: collapse;
  background: #ffffff;
}

.manual-page .manual-table th,
.manual-page .manual-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border-color);
  text-align: left;
  font-variant-numeric: tabular-nums;
}

.manual-page .manual-table th {
  background: #f8fafc;
  font-weight: 800;
}

.manual-page .manual-table tbody tr:hover {
  background: #f8fafc;
}

.manual-page .manual-print-sheet {
  margin-top: 12px;
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 14px;
  box-shadow: var(--shadow-sm);
}

.manual-page .manual-print-header {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: start;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 10px;
  margin-bottom: 12px;
}

.manual-page .manual-print-title {
  font-weight: 900;
  font-size: 1.05rem;
}

.manual-page .manual-print-sub {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.manual-page .manual-print-meta {
  font-size: 0.9rem;
  color: var(--text-main);
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 320px;
}

.manual-page .manual-print-meta > div {
  display: grid;
  grid-template-columns: 70px 1fr;
  align-items: center;
  gap: 8px;
}

.manual-page .manual-print-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.manual-page .manual-print-span {
  grid-column: 1 / -1;
}

.manual-page .manual-print-block {
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 12px;
}

.manual-page .manual-print-block-title {
  font-weight: 900;
  margin-bottom: 8px;
}

.manual-page .manual-print-inline {
  font-size: 0.95rem;
}

.manual-page .manual-check {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin: 6px 0;
}

.manual-page .manual-check input[type="checkbox"] {
  transform: translateY(2px);
}

.checklist-input {
  border: none;
  border-bottom: 1.5px solid #333;
  padding: 2px 4px;
  font-family: inherit;
  font-size: 0.95rem;
  background: transparent;
  outline: none;
  width: 100%;
  box-sizing: border-box;
  color: inherit;
}

.checklist-input:focus {
  border-bottom-color: #1e3a8a;
  background-color: #f0f9ff;
}

.checklist-input::placeholder {
  color: #94a3b8;
  font-style: italic;
}

.manual-page .manual-print-notes {
  margin-top: 12px;
  border-top: 1px solid var(--border-color);
  padding-top: 10px;
  font-size: 0.95rem;
}

@media (max-width: 900px) {
  .manual-page .manual-toc {
    grid-template-columns: 1fr;
  }

  .manual-page .manual-print-header {
    grid-template-columns: 1fr;
  }

  .manual-page .manual-print-grid {
    grid-template-columns: 1fr;
  }
}

@media print {
  body.manual-page.print-checklist header,
  body.manual-page.print-checklist footer,
  body.manual-page.print-checklist .hero,
  body.manual-page.print-checklist nav,
  body.manual-page.print-checklist .print-hide {
    display: none !important;
  }

  body.manual-page.print-checklist main > * {
    display: none !important;
  }

  body.manual-page.print-checklist #checklist-imprimivel {
    display: block !important;
  }

  body.manual-page.print-checklist #checklist-sheet {
    display: block !important;
    box-shadow: none !important;
    border: none !important;
    padding: 0 !important;
    margin: 0 !important;
  }

  body.manual-page.print-checklist .manual-mono {
    border-color: #cbd5e1 !important;
    background: #f8fafc !important;
  }
}

a {
  text-decoration: none;
  color: inherit;
  transition: color 0.2s;
}

/* Layout */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

/* Header - Technical & Professional */
header, .header {
  background-color: var(--primary);
  color: var(--text-inverse);
  padding: 1rem 0;
  box-shadow: var(--shadow-md);
  position: relative; /* Changed from sticky to relative so it scrolls away */
  z-index: 50;
  border-bottom: none; /* Override old */
}

.header-flex {
  display: flex !important;
  justify-content: space-between;
  align-items: center;
  gap: 2rem;
  flex-wrap: wrap;
}

.header-flex > *,
.brand,
.nav-main {
  min-width: 0;
}

/* Fix for existing HTML structure using .header */
.header-top, .brand {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  max-width: 100%; /* Changed from 1200px to 100% to avoid overflow */
  margin: 0 auto;
  padding: 0; /* Padding handled by container */
}

.brand > div, .header-top > div:first-child {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.brand img, .header-top img {
  height: 48px;
  background: white;
  padding: 4px;
  border-radius: var(--radius-sm);
}

.brand h1, .header h1 {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.2;
  margin: 0;
  color: white;
}

.brand p, .header p {
  font-size: 0.875rem;
  color: #94a3b8; /* Slate 400 */
  margin: 0;
}

/* Navigation */
nav, .nav {
  display: flex;
  gap: 0.5rem;
}

.nav-main {
  display: flex;
  gap: 1.5rem;
}

nav a, .nav a, .nav-link {
  font-size: 0.875rem;
  font-weight: 500;
  padding: 0.5rem 1rem;
  border-radius: var(--radius-md);
  color: #cbd5e1; /* Slate 300 */
  transition: all 0.2s;
  text-decoration: none;
  background: transparent; /* Override old */
}

.nav-link {
  border-bottom: 2px solid transparent;
  padding: 0.5rem 0;
}

nav a:hover, nav a.active, .nav a:hover, .nav-link:hover {
  background-color: rgba(255, 255, 255, 0.1);
  color: var(--text-inverse);
}

.nav-link.active {
  color: var(--text-inverse);
  border-bottom-color: var(--accent);
  background: transparent;
}

/* Botão de tema (injetado via JS) */
.theme-toggle {
  margin-left: 0.5rem;
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-inverse);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}

.theme-toggle:hover {
  background: rgba(255, 255, 255, 0.14);
}

/* Content */
main, .content {
  max-width: 1200px;
  margin: 2rem auto;
  padding: 0 1rem;
  /* Grid layout for main content if desired */
}

/* Cards (Sections) */
.section, .card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: 1.5rem;
  margin-bottom: 2rem;
}

.section-title {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--primary);
  margin-bottom: 1.5rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border-color);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.section-title-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border-color);
}
.section-title-row .section-title {
  margin-bottom: 0;
  border-bottom: none;
  padding-bottom: 0;
}

/* Status inline (ex.: Integração Climática) */
.status-inline {
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  background: #f8fafc;
  color: var(--text-main);
  font-size: 0.875rem;
  display: flex;
  align-items: center;
  gap: 10px;
}

.status-inline.hidden {
  display: none;
}

.status-inline.status-info {
  border-color: #bfdbfe;
  background: #eff6ff;
  color: #1e3a8a;
}

.status-inline.status-success {
  border-color: #bbf7d0;
  background: #f0fdf4;
  color: #14532d;
}

.status-inline.status-error {
  border-color: #fecaca;
  background: #fef2f2;
  color: #7f1d1d;
}

.spinner {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid rgba(15, 23, 42, 0.2);
  border-top-color: rgba(37, 99, 235, 0.9);
  animation: 0.9s spin linear infinite;
  flex: 0 0 auto;
}

.spinner.hidden {
  display: none;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Forms */
.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.25rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
}

.grid-span-2 {
  grid-column: 1 / -1;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

label {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-main);
}

input[type="text"],
input[type="date"],
input[type="time"],
input[type="number"],
select,
textarea {
  width: 100%;
  padding: 0.625rem;
  font-size: 0.95rem;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  background-color: #fff;
  transition: border-color 0.2s, box-shadow 0.2s;
  font-family: inherit;
}

input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--input-focus-ring);
}

.form-hint {
  font-size: 0.75rem;
  color: var(--text-secondary);
  margin-top: 0.25rem;
}

/* Readings Grid (Specific to App) */
.readings-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  gap: 0.75rem;
}

.reading-input {
  background: #f1f5f9;
  padding: 0.5rem;
  border-radius: var(--radius-sm);
  text-align: center;
  border: 1px solid transparent; /* Fix border size jump */
}

.reading-input:focus-within {
  border-color: var(--accent);
  background: #fff;
  box-shadow: var(--shadow-sm);
}

.reading-input label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.25rem;
  color: var(--text-secondary);
}

.reading-input input, .reading-input select {
  text-align: center;
  padding: 0.25rem;
  height: 32px;
  font-size: 0.9rem;
}

/* Button Group */
.button-group {
  display: flex;
  gap: 1rem;
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border-color);
  flex-wrap: wrap;
}

button, .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.5rem;
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.2s;
  border: 1px solid transparent; /* Consistency */
  gap: 0.5rem;
  text-decoration: none;
}

/* Botões dentro de formulários (altura/espaçamento alinhados com inputs) */
.btn-form {
  width: 100%;
  padding: 0.625rem 0.75rem;
  min-height: 42px;
}

.clima-actions {
  /* Alinha visualmente o botão com os campos que possuem label acima */
  padding-top: 1.55rem;
}

@media (min-width: 720px) {
  /* Mantém o botão na última coluna quando houver 2+ colunas */
  .clima-actions {
    grid-column: -2 / -1;
  }
}

.btn-primary {
  background-color: var(--accent);
  color: white;
}
.btn-primary:hover { background-color: var(--accent-hover); box-shadow: var(--shadow-md); transform: translateY(-1px); }

.btn-success {
  background-color: var(--success);
  color: white;
}
.btn-success:hover { background-color: var(--success-hover); box-shadow: var(--shadow-md); transform: translateY(-1px); }

.btn-secondary {
  background-color: #ffffff;
  color: var(--text-main);
  border-color: var(--border-color);
}
.btn-secondary:hover { background-color: #f1f5f9; border-color: #cbd5e1; }

/* Results Area */
.results {
  background-color: #f0f9ff;
  border: 1px solid #bae6fd;
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  margin-top: 2rem;
  animation: fadeIn 0.4s ease;
}

.results-hidden { display: none; }

.result-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
}

/* Espaçamento vertical entre blocos de resultados */
.results .section-title + .result-grid {
  margin-top: 0;
}

.results .result-grid {
  margin-top: 1.25rem;
}

.results .calc-details {
  margin: 1.5rem 0;
}

.results .readings-table {
  margin-top: 1.5rem;
}

.result-box {
  background: white;
  border: 1px solid var(--border-color);
  border-left: 5px solid var(--accent);
  padding: 1.25rem;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}

.result-label {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-secondary);
  text-transform: uppercase;
  margin-bottom: 0.5rem;
  display: block;
}

.result-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 0.5rem;
}

.help-btn.help-btn-mini {
  padding: 0.2rem 0.55rem;
  font-size: 0.75rem;
  white-space: nowrap;
}

.result-value {
  font-size: 2rem;
  font-weight: 800;
  color: var(--primary);
  line-height: 1.2;
  margin-top: 0.15rem;
}

.result-unit {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-left: 0.25rem;
  margin-top: 0.35rem;
}

.result-box.success { border-left-color: var(--success); }
.success-text { color: var(--success); }

/* Tables */
.readings-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1rem;
  font-size: 0.9rem;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md); /* Might require overflow hidden on container */
}

.readings-table th {
  background-color: #f8fafc;
  color: var(--text-secondary);
  font-weight: 600;
  text-align: left;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border-color);
}

.readings-table td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border-color);
}

.readings-table tr:hover { background-color: #f9fafb; }

/* Modals */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background-color: rgba(15, 23, 42, 0.75);
  backdrop-filter: blur(2px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 1rem;
}

.modal-backdrop.open { display: flex; animation: fadeIn 0.2s; }

.modal {
  background: white;
  width: 100%;
  max-width: 800px;
  max-height: 90vh;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
}

.modal-header {
  padding: 1.25rem;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--primary); /* Maintain technical look */
  color: white;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.modal-header h3 { font-size: 1.125rem; font-weight: 700; margin: 0; }

.modal-close {
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.2);
  color: white;
  padding: 0.4rem 0.6rem;
  border-radius: var(--radius-md);
  cursor: pointer;
  line-height: 1;
  font-size: 0.9rem;
}
.modal-close:hover { background: rgba(255,255,255,0.2); }

.modal-body {
  padding: 1.5rem;
  overflow-y: auto;
  font-size: 0.95rem;
  color: var(--text-main);
  line-height: 1.6;
}

/* Utilities */
.hidden { display: none !important; }

.message {
  padding: 1rem;
  border-radius: var(--radius-md);
  margin-bottom: 1rem;
  font-size: 0.9rem;
  font-weight: 500;
}
.message.success { background-color: #d1fae5; color: #065f46; border: 1px solid #a7f3d0; }
.message.error { background-color: #fee2e2; color: #991b1b; border: 1px solid #fca5a5; }

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.help-btn {
  background: transparent;
  color: var(--accent);
  border: 1px solid var(--border-color);
  font-size: 0.8rem;
  padding: 0.3rem 0.75rem;
  border-radius: 999px;
  cursor: pointer;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.help-icon {
  background: var(--accent);
  color: white;
  width: 16px; height: 16px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 10px;
}
.help-btn:hover { background-color: #eff6ff; border-color: var(--accent); }

/* Retro compatibility helpers */
.grid { display: grid; gap: 1rem; }
.card p { color: var(--text-secondary); }

/* Hero Index - Landing Page */
.main-index {
  max-width: 1200px;
  margin: 0 auto;
  padding: 3rem 1rem;
  flex: 1;
}

.hero-index {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
  animation: fadeIn 0.5s ease;
}

.hero-content h2 {
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--primary);
  margin-bottom: 1rem;
  line-height: 1.2;
}

.hero-content p {
  font-size: 1.125rem;
  color: var(--text-secondary);
  margin-bottom: 2rem;
  line-height: 1.6;
}

.cta-buttons {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.cta-buttons .btn-primary,
.cta-buttons .btn-secondary {
  padding: 1rem 2rem;
  font-size: 1rem;
  border-radius: var(--radius-lg);
  font-weight: 600;
}

.cta-buttons .btn-primary {
  background-color: var(--accent);
  color: white;
  border: none;
  transition: all 0.3s ease;
}

.cta-buttons .btn-primary:hover {
  background-color: var(--accent-hover);
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}

.cta-buttons .btn-secondary {
  background-color: white;
  color: var(--accent);
  border: 2px solid var(--accent);
  transition: all 0.3s ease;
}

.cta-buttons .btn-secondary:hover {
  background-color: var(--accent);
  color: white;
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}

.hero-aside {
  background: white;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: var(--shadow-md);
}

.hero-aside h3 {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 1.5rem;
}

.quick-list {
  list-style: none;
  margin-bottom: 1.5rem;
}

.quick-list li {
  padding: 0.75rem 0;
  padding-left: 1.75rem;
  position: relative;
  color: var(--text-main);
  font-weight: 500;
}

.quick-list li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--success);
  font-weight: 700;
  font-size: 1.25rem;
}

.info-box {
  background: #eff6ff;
  border-left: 4px solid var(--accent);
  padding: 1rem;
  border-radius: var(--radius-md);
  color: #1e40af;
  font-weight: 500;
  font-size: 0.95rem;
}

/* Footer Index */
.footer-index {
  background-color: var(--primary);
  color: var(--text-inverse);
  padding: 2rem 0;
  margin-top: auto;
  text-align: center;
  width: 100%;
}

.footer-index p {
  margin: 0;
  font-size: 0.9rem;
  color: #94a3b8;
}

/* Responsive - Tablet and Mobile */
@media (max-width: 1024px) {
  .header-flex {
    flex-direction: column;
    align-items: center;
    gap: 1.25rem;
  }

  .brand {
    width: 100%;
    text-align: center;
  }

  .brand > div {
    flex-direction: column;
    align-items: center;
  }

  .nav-main {
    width: 100%;
    justify-content: center;
    gap: 0.5rem;
    flex-wrap: wrap;
  }

  .nav-link {
    white-space: normal;
  }
}

@media (max-width: 900px) {
  .header-flex {
    flex-direction: column;
    align-items: center;
    gap: 1.25rem;
  }

  .brand {
    width: 100%;
    text-align: center;
  }

  .brand > div {
    flex-direction: column;
    align-items: center;
  }

  .nav-main {
    width: 100%;
    justify-content: center;
    gap: 0.5rem;
    flex-wrap: wrap;
  }

  .nav-link {
    white-space: normal;
  }
}

@media (max-width: 768px) {
  .hero-index {
    grid-template-columns: 1fr;
    gap: 2rem;
    text-align: center;
  }

  .hero-content h2 {
    font-size: 2rem;
  }
  
  .hero-aside {
    text-align: left; /* Keep list left-aligned for readability */
  }

  .cta-buttons {
    flex-direction: column;
    align-items: center;
  }

  .cta-buttons .btn-primary,
  .cta-buttons .btn-secondary {
    width: 100%;
    max-width: 300px; /* Prevent too wide buttons */
    text-align: center;
  }

  .header-flex {
    flex-direction: column;
    align-items: center; /* Center align header content */
    gap: 1.5rem;
    padding-bottom: 0.5rem;
  }
  
  .brand {
    justify-content: center;
    width: 100%;
    text-align: center;
  }
  
  .brand > div {
    flex-direction: column;
    gap: 0.5rem;
  }

  .nav-main {
    width: 100%;
    justify-content: center;
    gap: 0.5rem;
    flex-wrap: wrap; /* Allow wrapping on very small screens */
  }
  
  .nav-link {
    font-size: 0.95rem; /* Slightly larger targets */
    padding: 0.5rem 0.75rem;
    background-color: rgba(255, 255, 255, 0.05); /* Slight bg for touch targets */
    border-radius: var(--radius-sm);
  }

  .main-index {
    padding: 1.5rem 1rem;
  }
}

.chart-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin: 16px 0;
}

.chart-container {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 12px;
  box-shadow: var(--shadow-sm);
}

/* Long term analysis fuzzy UI helpers */
.lt-card {
  margin-top: 14px;
}

.lt-card-space {
  margin-bottom: 16px;
}

.lt-muted {
  color: #555;
  margin-top: 8px;
}

.lt-muted-2 {
  color: #666;
  margin-top: 10px;
}

.lt-form-spacer {
  margin-top: 10px;
}

.lt-grid-spacer {
  margin-top: 12px;
}

.lt-toggle-label {
  display: flex;
  gap: 10px;
  align-items: center;
}

.lt-hidden {
  display: none;
}

.lt-hint {
  color: #555;
}

.lt-list {
  padding-left: 18px;
}

.lt-fuzzy-score {
  font-weight: 700;
  color: #1b5e20;
  font-size: 18px;
}

.lt-fuzzy-explain {
  color: #666;
  margin-top: 6px;
}

.lt-section-title-sm {
  margin-bottom: 8px;
}

.lt-spacer-10 {
  margin-top: 10px;
}

@media (max-width: 1024px) {
  .chart-row {
    grid-template-columns: 1fr;
  }
}
