/* munotes.com — education events news. Mobile-first, no framework, no JS. */

:root {
  --accent: #0b6e4f;
  --accent-dark: #095c42;
  --ink: #191f26;
  --muted: #5b6572;
  --line: #e5e3dc;
  --bg: #faf9f6;
  --card: #ffffff;
  --radius: 10px;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 1rem;
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg);
}

img { max-width: 100%; }

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

h1, h2, h3 { font-family: Georgia, "Times New Roman", serif; letter-spacing: -0.01em; }

.container {
  max-width: 62rem;
  margin: 0 auto;
  padding: 0 1rem 3rem;
}

/* Header / footer */
.site-header {
  background: var(--card);
  border-bottom: 3px solid var(--accent);
}
.site-header .inner {
  max-width: 62rem;
  margin: 0 auto;
  padding: 0.75rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}
.brand {
  font-weight: 700;
  font-size: 1.3rem;
  color: var(--ink);
  text-decoration: none;
}
.brand span { color: var(--accent); }
.site-nav { display: flex; flex-wrap: wrap; gap: 0 1rem; }
.site-nav a {
  text-decoration: none;
  color: var(--muted);
  font-weight: 500;
  font-size: 0.95rem;
}
.site-nav a:hover { color: var(--accent); }

.site-footer {
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.875rem;
  background: var(--card);
}
.site-footer .inner {
  max-width: 62rem;
  margin: 0 auto;
  padding: 1.25rem 1rem;
}
.site-footer p { margin: 0; }
.site-footer p + p { margin-top: 0.5rem; }
.footer-links a { margin-right: 0.25rem; }

/* Hero / page head */
.hero, .page-head { padding: 2.25rem 0 1rem; }
.hero h1, .page-head h1 {
  font-size: 2rem;
  line-height: 1.2;
  margin: 0 0 0.5rem;
}
p.lede { color: var(--muted); margin: 0 0 1rem; max-width: 42rem; font-size: 1.05rem; }

/* Category chips */
.cat-strip {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin: 0.75rem 0 0;
  padding: 0;
  list-style: none;
}
.chip {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 600;
  line-height: 1;
  padding: 0.35em 0.7em;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--muted);
  text-decoration: none;
  white-space: nowrap;
}
a.chip:hover { border-color: var(--accent); color: var(--accent); }
.chip.active { border-color: var(--accent); background: var(--accent); color: #fff; }
.chip[data-cat="central"]       { background: #e8f0fb; color: #1d4f91; border-color: #cddcf2; }
.chip[data-cat="state"]         { background: #e6f4ec; color: #1e6b3f; border-color: #c8e5d3; }
.chip[data-cat="private"]       { background: #f1eafa; color: #5f3a9e; border-color: #ddcdf0; }
.chip[data-cat="international"] { background: #e5f4f4; color: #14676b; border-color: #c5e5e5; }
.chip[data-cat="other"]         { background: #f0f0ee; color: #565b61; border-color: #dededa; }
.chip.closing                   { background: #fbebea; color: #93312a; border-color: #f0c9c5; font-weight: 700; }
.card-meta .amount              { color: var(--accent-dark); font-weight: 600; }

/* Sections */
.section-title {
  font-size: 1.35rem;
  margin: 2rem 0 0.9rem;
  padding-bottom: 0.4rem;
  border-bottom: 2px solid var(--line);
}
.more-link { margin: 0.75rem 0 0; font-weight: 500; }
.empty { color: var(--muted); padding: 2rem 0; }

/* Event cards */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(17rem, 1fr));
  gap: 0.9rem;
}
.card {
  display: flex;
  gap: 0.85rem;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0.9rem;
}
.date-badge {
  flex: 0 0 auto;
  width: 3.1rem;
  height: 3.4rem;
  border: 1px solid var(--line);
  border-top: 3px solid var(--accent);
  border-radius: 8px;
  background: var(--bg);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  line-height: 1.1;
}
.date-badge .d { font-weight: 700; font-size: 1.15rem; }
.date-badge .m { font-size: 0.72rem; text-transform: uppercase; color: var(--muted); letter-spacing: 0.06em; }
.card-body { min-width: 0; }
.card-title {
  font-size: 1.02rem;
  line-height: 1.35;
  margin: 0 0 0.25rem;
  font-family: inherit;
}
.card-title a { color: var(--ink); text-decoration: none; }
.card-title a:hover { color: var(--accent); }
.card-meta { margin: 0 0 0.35rem; color: var(--muted); font-size: 0.85rem; }
.card-dates { margin: 0; font-size: 0.82rem; color: var(--muted); display: flex; align-items: center; gap: 0.45rem; flex-wrap: wrap; }

/* Latest list */
.latest-list { list-style: none; margin: 0; padding: 0; }
.latest-list li {
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}
.latest-list a { font-weight: 500; text-decoration: none; color: var(--ink); }
.latest-list a:hover { color: var(--accent); }
.latest-meta { color: var(--muted); font-size: 0.82rem; display: flex; align-items: center; gap: 0.45rem; }

/* Event detail */
.event-detail { max-width: 46rem; }
.breadcrumb { font-size: 0.85rem; color: var(--muted); margin: 1.5rem 0 0.5rem; }
.event-detail h1 { font-size: 1.8rem; line-height: 1.25; margin: 0.25rem 0 0.75rem; }
.meta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 1rem;
  padding: 0.7rem 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  margin-bottom: 1rem;
  font-size: 0.92rem;
}
.meta-item { color: var(--muted); }
.meta-item strong { color: var(--ink); }
.event-body { max-width: 42rem; }
.event-body p { margin: 0 0 1rem; }
.banner-past {
  background: #fdf1df;
  border: 1px solid #f3ddb7;
  color: #8a5a10;
  border-radius: var(--radius);
  padding: 0.7rem 1rem;
  margin: 1rem 0 0.5rem;
  font-size: 0.92rem;
}
.source-link { margin: 1.25rem 0; }
.fineprint { color: var(--muted); font-size: 0.82rem; border-top: 1px solid var(--line); padding-top: 0.75rem; }

/* Buttons */
.btn {
  display: inline-block;
  background: var(--accent);
  color: #fff !important;
  font-weight: 600;
  text-decoration: none;
  border: 0;
  border-radius: 8px;
  padding: 0.6em 1.1em;
  font-size: 0.95rem;
  cursor: pointer;
}
.btn:hover { background: var(--accent-dark); }

/* Pagination */
.pagination {
  display: flex;
  align-items: center;
  gap: 1rem;
  justify-content: center;
  margin: 1.5rem 0 0;
  color: var(--muted);
  font-size: 0.92rem;
}

/* Static pages / notices */
.prose, .notice { max-width: 44rem; padding-top: 1.5rem; }
.prose h1 { font-size: 1.8rem; }
.prose h2 { font-size: 1.25rem; margin-top: 1.75rem; }
.notice { text-align: center; padding: 3rem 1rem; }

/* ------------------------------------------------------------------ admin */
.admin .site-header { border-bottom-color: var(--ink); }
.admin-bar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding-top: 1.5rem; flex-wrap: wrap; }
.admin-bar h1 { margin: 0; }
.admin-card { max-width: 26rem; margin: 3rem auto 0; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.5rem; }
.admin-card.wide { max-width: 46rem; margin-top: 1.5rem; }
.admin-card h1 { margin: 0 0 1rem; font-size: 1.4rem; }
.admin label { display: block; font-weight: 600; font-size: 0.9rem; margin: 0.9rem 0 0.25rem; }
.admin label small { font-weight: 400; color: var(--muted); }
.admin input[type="text"], .admin input[type="password"], .admin input[type="url"],
.admin input[type="date"], .admin select, .admin textarea {
  width: 100%;
  font: inherit;
  padding: 0.5em 0.65em;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
}
.admin textarea { resize: vertical; }
.admin .btn { margin-top: 1rem; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0 1rem; }
.admin-actions { display: flex; align-items: center; gap: 1rem; }
.admin-actions .cancel { color: var(--muted); }
.form-error { background: #fbebea; border: 1px solid #f0c9c5; color: #93312a; border-radius: 8px; padding: 0.6rem 1rem; margin: 0.75rem 0; font-size: 0.9rem; }
.form-error ul { margin: 0; padding-left: 1.1rem; }
.flash { background: #e6f4ec; border: 1px solid #c8e5d3; color: #1e6b3f; border-radius: 8px; padding: 0.5rem 1rem; font-size: 0.9rem; }
.table-wrap { overflow-x: auto; }
.admin-table { width: 100%; border-collapse: collapse; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); font-size: 0.92rem; }
.admin-table th, .admin-table td { text-align: left; padding: 0.55rem 0.75rem; border-bottom: 1px solid var(--line); vertical-align: middle; }
.admin-table th { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); }
.admin-table a { text-decoration: none; font-weight: 500; }
.nowrap { white-space: nowrap; }
.row-actions { white-space: nowrap; display: flex; gap: 0.75rem; align-items: center; }
.status { font-size: 0.78rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; }
.status-published { color: #1e6b3f; }
.status-draft { color: #8a5a10; }
.inline-form { display: inline; margin: 0; }
.linklike { background: none; border: 0; padding: 0; font: inherit; color: var(--accent); cursor: pointer; }
.linklike:hover { color: var(--accent-dark); }
.linklike.danger { color: #93312a; }

/* Small screens */
@media (max-width: 480px) {
  .hero h1, .page-head h1 { font-size: 1.55rem; }
  .field-row { grid-template-columns: 1fr; }
  .latest-list li { flex-direction: column; gap: 0.15rem; }
}
