/* Studie-innhold (temaer/historier/tall/dager) — felles kort/liste/detalj.
   Bruker token-broen; gjenbruker .persons-filter-button og .person-ref-chip
   fra persons.css der de trengs (last begge når det trengs). */

.study-main { padding: 48px 0; }

.study-search-container { margin-bottom: 20px; }
.study-search-input {
  width: 100%;
  padding: 12px 16px;
  font-size: 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--ink);
}
.study-search-input:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px var(--gold-bg); }
.study-search-input::placeholder { color: var(--muted); }

.study-filter-buttons { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 20px; }
/* .persons-filter-button gjenbrukes (persons.css) */

.study-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
  margin-top: 20px;
}
.study-grid-numbers { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }

.study-card {
  display: block;
  padding: 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  text-decoration: none;
  transition: box-shadow 0.12s ease, transform 0.12s ease;
}
.study-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.study-card-cat {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--gold-text);
  margin-bottom: 6px;
}
.study-card-title { font-size: 18px; margin: 0 0 6px; color: var(--ink); }
.study-card-desc { color: var(--ink-2); font-size: 14px; margin: 0; line-height: 1.5; }

.study-number-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 20px;
  text-align: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  text-decoration: none;
  transition: box-shadow 0.12s ease, transform 0.12s ease;
}
.study-number-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.study-big-number {
  font-family: var(--font-serif);
  font-size: 48px;
  font-weight: 700;
  color: var(--gold);
  line-height: 1;
}
.study-number-meaning { color: var(--ink-2); font-size: 14px; }

.study-empty { color: var(--muted); font-style: italic; margin-top: 16px; }

/* --- detalj --- */
.study-tagging { margin: 16px 0 24px; }
.study-introduction { font-size: 17px; line-height: 1.6; color: var(--ink-2); margin-bottom: 24px; }
.study-sections { display: flex; flex-direction: column; gap: 28px; }
.study-section h2 { margin-bottom: 8px; padding-bottom: 6px; border-bottom: 1px solid var(--border); }
.study-section-desc { color: var(--ink-2); margin-bottom: 12px; }

.study-description { font-size: 17px; line-height: 1.6; color: var(--ink-2); margin-bottom: 28px; }

.study-number-header { display: flex; align-items: center; gap: 20px; margin-bottom: 16px; }
.study-number-header .study-big-number { font-size: 64px; }

.study-day-header { margin-bottom: 16px; }
.study-day-meta { margin-top: 8px; }

.study-refs { margin-bottom: 32px; }
.study-refs h2 { margin-bottom: 12px; padding-bottom: 6px; border-bottom: 1px solid var(--border); }
.study-ref-list { display: flex; flex-wrap: wrap; gap: 6px; }

.study-ref-cards { display: flex; flex-wrap: wrap; gap: 10px; }
.study-ref-card {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 10px 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-decoration: none;
  min-width: 160px;
}
.study-ref-card:hover { border-color: var(--gold); }
.study-ref-name { color: var(--gold-text); font-weight: 500; }
.study-ref-reason { color: var(--muted); font-size: 13px; }

.study-date-list { display: flex; flex-wrap: wrap; gap: 12px; }
.study-date-item {
  display: flex;
  flex-direction: column;
  padding: 8px 14px;
  background: var(--paper-2);
  border-radius: var(--radius-sm);
}
.study-date-year { font-family: var(--font-mono); font-size: 12px; color: var(--muted); }
.study-date-value { color: var(--ink); }

/* person-ref-chip brukes for tall-referanser — inkluder persons.css der.
   Fallback her hvis persons.css ikke er lastet: */
.study-ref-list .person-ref-chip {
  display: inline-block;
  padding: 4px 10px;
  font-size: 13px;
  background: var(--paper-2);
  color: var(--gold-text);
  border-radius: var(--radius-sm);
  text-decoration: none;
}
.study-ref-list .person-ref-chip:hover { background: var(--gold-bg); color: var(--ink); }

/* /dager: kronologisk/tematisk-faner, grupper og neste-dato (GitHub #3) */
.study-view-tabs {
  display: inline-flex;
  gap: 4px;
  margin: 4px 0 12px;
  padding: 4px;
  background: var(--paper-2);
  border-radius: var(--radius-sm);
}
.study-view-tab {
  padding: 6px 14px;
  font-size: 14px;
  color: var(--ink-2);
  text-decoration: none;
  border-radius: var(--radius-sm);
}
.study-view-tab.is-active {
  background: var(--paper);
  color: var(--ink);
  font-weight: 600;
  box-shadow: var(--shadow-sm);
}
.study-group { margin: 0 0 28px; }
.study-group-title {
  font-size: 15px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin: 0 0 12px;
}
.study-card-date { font-family: var(--font-mono); font-size: 12px; color: var(--gold-text); margin: 8px 0 0; }
