/* Open Crypto Asset Pricing — style matching openassetpricing.com */

/* --- Typography --- */

body {
  font-family: 'Lato', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  font-size: 16px;
  font-weight: 400;
  line-height: 1.625;
  color: #000;
  background: #fff;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Merriweather', 'Lato', Georgia, serif;
  font-weight: 400;
  color: #000;
  line-height: 1.4;
}

h1 { font-size: 1.8rem; }
h2 { font-size: 1.4rem; margin-top: 2rem; }
h3 { font-size: 1.2rem; }

/* --- Navbar --- */

.navbar {
  background-color: #fff !important;
  border-bottom: 1px solid #000;
  padding: 0;
}

.navbar-brand {
  font-family: 'Merriweather', Georgia, serif;
  font-size: 1.3rem;
  font-weight: 400;
  color: #000 !important;
}

.navbar .nav-link {
  font-family: 'Lato', sans-serif;
  font-size: 0.85rem;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #000 !important;
  padding: 0.9rem 1rem;
}

.navbar .nav-link:hover {
  color: #333 !important;
}

.navbar .nav-link.active {
  font-weight: 700;
}

/* --- Links --- */

a {
  color: #000;
  text-decoration: underline;
  transition: all 0.10s linear;
}

a:hover {
  color: #333;
}

/* --- Blockquotes --- */

blockquote {
  border-left: 3px solid #000;
  background: transparent;
  padding: 0.5rem 1.25rem;
  font-style: italic;
  color: #000;
}

/* --- Tables --- */

.table {
  font-size: 0.9rem;
  border-collapse: collapse;
}

.table th,
.table td {
  padding: 0.6rem 0.75rem;
  text-align: left;
}

.table tr {
  border-bottom: 1px solid #000;
}

.table thead {
  border-bottom: 2px solid #000;
}

.table caption {
  font-style: italic;
  color: #555;
  caption-side: bottom;
  padding-top: 0.5rem;
  font-size: 0.85rem;
}

/* --- Code blocks --- */

pre {
  background: #eee;
  padding: 1.4em;
  font-size: 0.9rem;
  line-height: 1.6;
  border: none;
  border-radius: 0;
}

code {
  font-size: 0.9em;
}

/* --- Parameter selector grid (download page) --- */

.parameter-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem 2rem;
  margin: 1.5rem 0;
  padding: 1.5rem;
  background: #fff;
  border: 1px solid #000;
}

@media (max-width: 768px) {
  .parameter-grid {
    grid-template-columns: 1fr;
  }
}

.param-group {
  display: flex;
  flex-direction: column;
}

.param-group label {
  font-family: 'Lato', sans-serif;
  font-weight: 700;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  margin-bottom: 0.3rem;
  color: #000;
}

.param-select {
  padding: 0.5rem 0.75rem;
  font-size: 0.9rem;
  font-family: 'Lato', sans-serif;
  border: 1px solid #000;
  border-radius: 0;
  background-color: #fff;
  color: #000;
  cursor: pointer;
}

.param-select:focus {
  border-color: #000;
  outline: 0;
  box-shadow: 0 0 0 0.15rem rgba(0, 0, 0, 0.15);
}

/* --- Code snippets --- */

.code-snippet {
  margin: 1rem 0 2rem 0;
}

.code-snippet .code-tabs {
  font-size: 0.85rem;
}

.code-snippet pre {
  background: #eee;
  padding: 0.8rem 1rem;
  margin: 0.3rem 0 1rem 0;
  border: none;
  font-size: 0.85rem;
  line-height: 1.5;
}

/* --- Filename display --- */

.filename-display {
  margin: 1rem 0;
  padding: 0.75rem 1rem;
  background: #eee;
  font-size: 0.95rem;
}

.filename-display code {
  font-size: 0.9rem;
  color: #000;
  background: none;
  padding: 0;
}

/* --- Download actions --- */

.download-actions {
  display: flex;
  gap: 1rem;
  margin: 1rem 0 2rem 0;
  align-items: center;
}

.download-actions .btn {
  padding: 0.6rem 1.5rem;
  font-family: 'Lato', sans-serif;
  font-weight: 700;
  font-size: 0.9rem;
  border-radius: 3px;
  cursor: pointer;
  text-decoration: none;
  transition: opacity 0.15s ease-in-out;
}

.download-actions .btn-primary {
  background-color: #000;
  border: 1px solid #000;
  color: #fff;
}

.download-actions .btn-primary:hover {
  opacity: 0.85;
}

.download-actions .btn-outline-secondary {
  background-color: transparent;
  border: 1px solid #000;
  color: #000;
}

.download-actions .btn-outline-secondary:hover {
  background-color: #000;
  color: #fff;
}

/* --- Data preview --- */

.data-preview {
  margin: 1rem 0 2rem 0;
  overflow-x: auto;
}

.data-preview table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
  margin-top: 0.5rem;
}

.data-preview thead {
  background: #000;
  color: #fff;
}

.data-preview th,
.data-preview td {
  padding: 0.5rem 0.75rem;
  text-align: right;
  border-bottom: 1px solid #000;
}

.data-preview th:first-child,
.data-preview td:first-child {
  text-align: left;
}

.data-preview tbody tr:nth-child(even) {
  background: #f8f8f8;
}

.data-preview tbody tr:hover {
  background: #eee;
}

.data-preview .preview-header {
  font-size: 0.85rem;
  color: #656565;
  margin-bottom: 0.5rem;
}

.data-preview .preview-error {
  color: #c00;
  padding: 1rem;
  background: #fde;
  border: 1px solid #c00;
}

/* --- Home page --- */

.feature-list {
  list-style: none;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem 2rem;
  margin: 1.5rem auto;
  max-width: 700px;
  text-align: left;
  font-size: 0.95rem;
}

.feature-list li::before {
  content: "\2713";
  font-weight: 700;
  margin-right: 0.5rem;
}

@media (max-width: 768px) {
  .feature-list {
    grid-template-columns: 1fr;
  }
}

/* --- Home page grid --- */

.grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin: 2rem 0;
}

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

.g-col-6 {
  padding: 1.5rem;
  border: 1px solid #000;
  text-align: center;
}

.g-col-6 .btn {
  display: inline-block;
  text-decoration: none;
  padding: 0.6rem 1.5rem;
  border-radius: 3px;
  font-family: 'Lato', sans-serif;
  font-weight: 700;
  font-size: 0.9rem;
  margin-bottom: 0.75rem;
}

.g-col-6 .btn-primary {
  background-color: #000;
  color: #fff;
  border: 1px solid #000;
}

.g-col-6 .btn-outline-primary {
  background-color: transparent;
  color: #000;
  border: 1px solid #000;
}

.g-col-6 .btn:hover {
  opacity: 0.85;
}

/* --- Citation block --- */

.citation-block {
  background: #fff;
  border: 1px solid #000;
  padding: 1.25rem 1.5rem;
  font-size: 0.9rem;
}

.citation-block p {
  margin-bottom: 0.5rem;
}

.citation-block p:last-child {
  margin-bottom: 0;
}

/* --- Data badge --- */

.data-badge {
  text-align: center;
  margin: 0.5rem 0 1.5rem 0;
  padding: 0.6rem 1rem;
  background: #f8f8f8;
  border: 1px solid #ddd;
  font-size: 0.9rem;
  color: #333;
}

.last-updated {
  font-size: 0.85rem;
  color: #656565;
  text-align: center;
  margin-top: 0.25rem;
}

/* --- About page --- */

.about-section {
  margin-bottom: 2rem;
}

/* --- Utility --- */

hr {
  border: none;
  border-top: 1px solid #ccc;
  margin: 2rem 0;
}

/* --- Footer override --- */

.nav-footer {
  background-color: #000 !important;
  color: #fff;
  border-top: none;
}

.nav-footer a {
  color: #fff !important;
}

.nav-footer .nav-footer-center,
.nav-footer .nav-footer-left,
.nav-footer .nav-footer-right {
  color: #fff;
  opacity: 0.8;
  font-size: 0.85rem;
}
