/* Blog-only styles. The palette, type and header come from ../css/styles.css. */

.blog-main {
  padding: 3.5rem 0 4rem;
}

/* the blog list's only heading is the small "Blog" label: keep it looking like one */
.section-head h1.eyebrow {
  font-family: var(--sans);
  line-height: inherit;
}

.blog-main .wrap > h1 {
  font-size: clamp(1.8rem, 3.4vw, 2.7rem);
  margin: 0.35rem 0 0;
}

.post-list,
.admin-list {
  list-style: none;
  margin: 2.5rem 0 0;
  padding: 0;
  display: grid;
  gap: 1.4rem;
}

.post-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.5rem;
}

.post-card h2 {
  font-size: 1.5rem;
  margin: 0 0 0.5rem;
}

.post-card h2 a {
  text-decoration: none;
}

.post-card h2 a:hover {
  text-decoration: underline;
}

.post-date {
  margin: 0 0 0.4rem;
  color: var(--mint);
  font-size: 0.82rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 600;
}

.post-summary {
  margin: 0 0 0.8rem;
  color: var(--muted);
}

.post-full {
  max-width: 44rem;
}

.post-body {
  margin-top: 1.6rem;
  font-size: 1.06rem;
}

.post-body h2,
.post-body h3 {
  margin: 2rem 0 0.6rem;
}

.post-body p {
  margin: 0 0 1.1rem;
}

.post-body ul {
  margin: 0 0 1.1rem;
  padding-left: 1.2rem;
}

.post-body li {
  margin-bottom: 0.4rem;
}

.blog-empty {
  margin: 2.5rem 0;
  color: var(--muted);
}

.blog-admin-link {
  margin-top: 3rem;
}

/* --- admin --- */

.admin-narrow {
  max-width: 46rem;
}

.admin-bar {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
}

.admin-list li {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1rem 1.2rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
}

.admin-meta {
  display: block;
  color: var(--muted);
  font-size: 0.88rem;
}

.admin-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.inline-form {
  display: inline;
}

button.text-link {
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  color: var(--teal);
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 0.18em;
}

button.text-link.danger {
  color: #a3372f;
}

.admin-notice,
.admin-error,
.admin-warn,
.draft-flag {
  border-radius: var(--radius);
  padding: 0.7rem 1rem;
  margin: 1.2rem 0;
}

.admin-notice {
  background: rgba(92, 201, 164, 0.16);
  border: 1px solid var(--mint);
}

.admin-error {
  background: rgba(163, 55, 47, 0.1);
  border: 1px solid #a3372f;
  color: #7d2a24;
}

.admin-warn,
.draft-flag {
  background: rgba(214, 158, 46, 0.12);
  border: 1px solid #d69e2e;
}

.admin-help {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0.7rem 1rem;
  margin: 1.2rem 0;
}

.admin-help summary {
  cursor: pointer;
  font-weight: 600;
}

.admin-help ol {
  margin: 0.8rem 0;
  padding-left: 1.3rem;
}

.field-hint {
  margin: 0.4rem 0 0;
  color: var(--muted);
  font-size: 0.88rem;
}

.field-check {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

/* the site styles only cover input/textarea; match the select to them */
.field select {
  width: 100%;
  border: 1px solid var(--line);
  background: var(--cream);
  border-radius: 12px;
  padding: 0.8rem 0.9rem;
  font: inherit;
  color: var(--text);
}

.field select:focus {
  outline: 2px solid var(--mint);
  outline-offset: 2px;
}

.contact-form textarea {
  font-size: 0.98rem;
  line-height: 1.6;
}

.lang-switch a {
  text-decoration: none;
  padding: 0.2rem 0.5rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.82rem;
}

.lang-switch a[aria-current] {
  background: var(--mint);
  color: var(--teal);
}

/* --- lessons --- */

.lesson-intro {
  margin: 0 0 0.6rem;
  font-size: 1rem;
  color: var(--muted);
}

.lesson-intro > :last-child {
  margin-bottom: 0;
}

.lesson-preview summary {
  margin-top: 0.9rem;
  font-weight: 600;
  color: var(--teal);
  cursor: pointer;
}

.lesson-host {
  font-weight: 400;
  color: var(--muted);
}

.lesson-preview iframe {
  display: block;
  width: 100%;
  height: min(75vh, 720px);
  margin-top: 1rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
}

.admin-tabs {
  display: flex;
  gap: 1.4rem;
  margin: 0.4rem 0 1.4rem;
  border-bottom: 1px solid var(--line);
}

.admin-tabs a {
  padding: 0.5rem 0;
  margin-bottom: -1px;
  border-bottom: 2px solid transparent;
  font-weight: 600;
  color: var(--muted);
  text-decoration: none;
}

.admin-tabs a[aria-current] {
  color: var(--teal);
  border-bottom-color: var(--mint);
}
