/* Apple-inspired minimalist styles */
:root {
  --bg: #ffffff;
  --text: #111827;
  --muted: #6b7280;
  --accent: #0a84ff;
  /* iOS blue-like */
  --card-bg: #ffffff;
  --radius: 12px;
  --max-width: 1200px;
}

* {
  box-sizing: border-box
}

html,
body {
  height: 100%
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.5;
}

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 20px 20px;
}

.site-header {
  border-bottom: 1px solid #f0f0f0;
  background: rgba(255, 255, 255, 0.8);
  position: sticky;
  top: 0;
  backdrop-filter: blur(6px);
  z-index: 20;
}

.site-title {
  font-size: 16px;
  margin: 0;
  padding: 8px 0;
  display: inline-block;
}

.site-title a {
  color: var(--text);
  text-decoration: none
}

.site-nav {
  float: right
}

.site-nav a {
  color: var(--muted);
  text-decoration: none;
  margin-left: 18px;
  font-size: 14px
}

.site-nav a:hover {
  color: var(--text)
}

.main-content {
  padding-top: 28px;
  padding-bottom: 28px;
}

.card {
  background: var(--card-bg);
  border-radius: var(--radius);
  box-shadow: 0 8px 24px rgba(16, 24, 40, 0.06);
  padding: 14px;
  margin-bottom: 18px;
}

.card h2 {
  margin-top: 0;
  margin-bottom: 12px;
  font-size: 18px
}

.card p {
  color: var(--muted);
  margin-top: 0
}

/* iframe responsive wrapper and refinements */
:root {
  --embed-aspect: 56.25%;
  /* 16:9 */
  --embed-min-height: 420px;
  /* default min height for embeds */
}

.embed-wrap {
  position: relative;
  padding-bottom: var(--embed-aspect);
  height: 0;
  overflow: hidden;
  border-radius: 10px;
  min-height: var(--embed-min-height);
  background: transparent;
}

.embed-wrap iframe {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

/* taller variant */
.embed-tall {
  --embed-aspect: 70%;
  --embed-min-height: 560px;
}

/* small utility */
.muted {
  color: var(--muted)
}

/* card grid for index or overview pages */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 20px;
  margin-top: 12px
}

/* visual polish for embeds */
.card .embed-wrap {
  margin-top: 8px;
}

.embed-wrap:hover,
.embed-wrap:focus-within {
  box-shadow: 0 12px 30px rgba(16, 24, 40, 0.08);
  transform: translateY(-2px);
  transition: transform 180ms ease, box-shadow 180ms ease
}

/* nav and header polish */
.site-nav a {
  padding: 8px 10px;
  border-radius: 8px;
  transition: background-color 160ms, color 160ms
}

.site-nav a:hover {
  background: rgba(10, 132, 255, 0.06);
  color: var(--accent)
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px
}

/* make header less tall */
.site-header .container {
  padding: 8px 20px
}

/* accessibility and lazy-loading smoother appearance */
iframe[loading="lazy"] {
  opacity: 1;
  transition: opacity 200ms ease
}

footer.site-footer {
  padding: 24px 0;
  color: var(--muted);
  border-top: 1px solid #f3f4f6;
  text-align: center
}

@media (max-width:700px) {
  .site-nav {
    float: none;
    margin-top: 8px
  }

  .container {
    padding: 18px
  }

  .site-header .container {
    flex-direction: column;
    align-items: flex-start
  }

  .embed-wrap {
    min-height: 320px
  }

  .embed-tall {
    --embed-min-height: 420px;
  }
}

/* table styles for dataset description */
.table-wrap {
  overflow: auto
}

.table-wrap table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px
}

.table-wrap thead th {
  text-align: left;
  padding: 10px 12px;
  border-bottom: 1px solid #ececec;
  color: var(--text)
}

.table-wrap tbody td {
  padding: 10px 12px;
  border-bottom: 1px solid #f6f6f6;
  color: var(--muted)
}

.table-wrap tr:nth-child(even) td {
  background: rgba(0, 0, 0, 0.02)
}

.table-wrap table th:first-child,
.table-wrap table td:first-child {
  width: 30%
}

.table-wrap table th:nth-child(2),
.table-wrap table td:nth-child(2) {
  width: 15%
}

/* details grouping */
details.dataset-group {
  margin-bottom: 12px
}

details summary {
  font-weight: 600;
  cursor: pointer;
  padding: 8px 10px;
  border-radius: 8px
}

details[open] summary {
  background: rgba(10, 132, 255, 0.06)
}