/*
Theme Name: Nowodhow Kernewek (GeneratePress Child)
Template: generatepress
Description: Custom child theme for the Nowodhow Kernewek Cornish-language news hub, built on GeneratePress.
Version: 1.0
Author: Jeff Stanford
*/

:root {
  --ink: #1f2a24;
  --paper: #faf7f0;
  --accent: #1f6f4a;
  --accent-light: #e6f2ea;
  --border: #d9d2c2;
  --muted: #6b6357;
}

/* ---------- Base ---------- */

body {
  background: var(--paper);
  color: var(--ink);
  font-family: Georgia, 'Times New Roman', serif;
  line-height: 1.6;
}

a { color: var(--accent); }

/* ---------- Site header / branding ---------- */

.site-header,
.site-header .inside-header {
  background: var(--accent) !important;
  color: #fff;
  text-align: center;
  padding: 30px 20px 24px;
}

.site-header .site-title,
.site-header .site-title a,
.site-header .main-title,
.site-header .main-title a {
  color: #fff !important;
  font-family: Georgia, serif;
  font-weight: normal;
  font-size: 42px !important;
  line-height: 1.15;
}

.site-header .site-description {
  font-family: Helvetica, Arial, sans-serif;
  font-size: 13px;
  opacity: 0.9;
  color: #fff !important;
  margin-top: 8px;
}

.site-header .kicker {
  font-family: Helvetica, Arial, sans-serif;
  font-size: 12px;
  letter-spacing: 2px;
  text-transform: uppercase;
  opacity: 0.85;
  margin-bottom: 6px;
}

/* ---------- Nav ---------- */

.main-navigation,
#site-navigation {
  background: #fff !important;
  border-bottom: 1px solid var(--border);
}

.main-navigation .main-nav ul li a {
  font-family: Helvetica, Arial, sans-serif;
  font-size: 13px;
  color: var(--muted) !important;
  padding: 4px 10px;
  border-radius: 14px;
}

.main-navigation .main-nav ul li a.current,
.main-navigation .main-nav ul li.current-menu-item > a {
  background: var(--accent-light);
  color: var(--accent) !important;
  font-weight: bold;
}

/* ---------- Layout width ---------- */

.site-content,
.content-area {
  max-width: 680px;
  margin: 0 auto;
}

/* ---------- Date group headers (index page) ---------- */

.kw-topic-heading {
  font-family: Georgia, serif;
  font-size: 28px;
  font-weight: normal;
  color: var(--ink);
  margin: 0 0 20px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--accent-light);
}

.date-group {
  font-family: Helvetica, Arial, sans-serif;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--muted);
  margin: 28px 0 10px;
  padding-bottom: 4px;
  border-bottom: 1px solid var(--border);
}
.date-group:first-child { margin-top: 0; }

/* ---------- News cards (index page) ---------- */

article.news-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 16px 18px;
  margin-bottom: 14px;
  display: flex;
  gap: 14px;
  align-items: flex-start;
}

.news-card .thumb {
  width: 64px;
  height: 64px;
  border-radius: 8px;
  background: var(--accent-light);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
}

.news-card .card-body { flex: 1; min-width: 0; }

.news-card .tags {
  font-family: Helvetica, Arial, sans-serif;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--accent);
  margin-bottom: 4px;
}
.news-card .tags .tag { margin-right: 8px; }

.news-card h3 { margin: 0 0 6px; font-size: 18px; }
.news-card h3 a { color: var(--ink); text-decoration: none; }
.news-card h3 a:hover { color: var(--accent); }

.news-card .snippet {
  font-size: 14.5px;
  color: #3d453f;
  margin: 0 0 8px;
}

.news-card .meta {
  font-family: Helvetica, Arial, sans-serif;
  font-size: 12px;
  color: var(--muted);
  display: flex;
  gap: 12px;
  align-items: center;
}

.level-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 10px;
  background: var(--accent-light);
  color: var(--accent);
  font-weight: bold;
  font-family: Helvetica, Arial, sans-serif;
  font-size: 12px;
}

/* ---------- Article page: glossed text ---------- */

.kw-text {
  font-size: 19px;
  line-height: 1.8;
  font-family: Georgia, serif;
}

.kw-sentence {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 14px;
}

.kw-sentence .kw-play {
  flex-shrink: 0;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--accent-light);
  color: var(--accent);
  font-size: 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.kw-sentence .kw-play:hover { background: var(--accent); color: #fff; }

.gloss {
  color: var(--accent);
  font-weight: bold;
  text-decoration: underline;
  text-decoration-style: dotted;
  cursor: pointer;
  position: relative;
}

.kw-summary-box {
  font-family: Georgia, serif;
  font-size: 15px;
  padding: 14px 16px;
  background: var(--accent-light);
  border-radius: 8px;
  margin: 16px 0;
}

.kw-label {
  font-family: Helvetica, Arial, sans-serif;
  font-size: 11px;
  font-weight: bold;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: var(--accent);
  margin: 24px 0 8px;
}

.kw-source-credit {
  font-family: Helvetica, Arial, sans-serif;
  font-size: 12px;
  color: var(--muted);
  margin-top: 24px;
  border-top: 1px solid var(--border);
  padding-top: 12px;
}

/* Glossary popup (shared, injected by tooltip.js) */
.kw-gloss-popup {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%);
  max-width: 90%;
  width: 420px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px 16px;
  box-shadow: 0 6px 24px rgba(0,0,0,0.15);
  font-family: Helvetica, Arial, sans-serif;
  z-index: 9999;
  display: none;
}
.kw-gloss-popup.visible { display: block; }
.kw-gloss-popup .kw-gloss-meaning {
  font-weight: bold;
  color: var(--ink);
  margin-bottom: 4px;
  font-size: 15px;
}
.kw-gloss-popup .kw-gloss-note {
  font-size: 13px;
  color: var(--muted);
}

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

.site-footer,
#site-footer {
  text-align: center;
  font-family: Helvetica, Arial, sans-serif;
  font-size: 12px;
  color: var(--muted);
  background: var(--paper) !important;
  border-top: 1px solid var(--border);
  padding: 20px;
}
