/* ============================================================
   National Summit III — Church Archives and Heritage Workers
   Shared stylesheet
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,600;0,700;1,600;1,700&family=Inter:wght@400;500;600;700&display=swap');

:root{
  --ink:        #1B2340;
  --ink-soft:   #6B7280;
  --ink-faint:  #9AA1AC;
  --border:     #E5E7EB;
  --card-bg:    #FFFFFF;

  --pill-green-bg:   #DCFCE7;
  --pill-green-text: #158744;
  --pill-gray-bg:    #F1F2F4;
  --pill-gray-text:  #6B7280;
  --pill-amber-bg:   #FEF3C7;
  --pill-amber-text: #92700C;

  --page-bg:         #F9FAFB;
  --star:            #F59E0B;

  --shadow: 0 1px 2px rgba(16,24,40,0.04), 0 1px 3px rgba(16,24,40,0.06);
  --radius: 14px;

  --font-display: 'Playfair Display', Georgia, serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
}

*{ box-sizing: border-box; }

body{
  margin: 0;
  color: var(--ink);
  background: var(--page-bg);
  font-family: var(--font-body);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

a{ color: inherit; }

.wrap{
  max-width: 760px;
  margin: 0 auto;
  padding: 56px 24px 80px;
}

/* ---- Masthead used at the top of every page ---- */
.masthead{
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 16px;
  padding-bottom: 24px;
  margin-bottom: 32px;
  border-bottom: 1px solid var(--border);
}

.masthead-brand{
  display: flex;
  align-items: center;
  gap: 16px;
}

.masthead-logo{
  width: 52px;
  height: 52px;
  border-radius: 50%;
  flex-shrink: 0;
}

.masthead h1{
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 1.75rem;
  line-height: 1.25;
  letter-spacing: -0.01em;
  margin: 0 0 4px;
  color: var(--ink);
}

.masthead .subline{
  color: var(--ink-soft);
  font-size: 0.92rem;
}

.masthead-aside{
  color: var(--ink-faint);
  font-size: 0.85rem;
  text-decoration: none;
  white-space: nowrap;
}

.masthead-aside:hover{ color: var(--ink-soft); }

.back-link{
  display: inline-block;
  margin-bottom: 20px;
  font-size: 0.85rem;
  color: var(--ink-faint);
  text-decoration: none;
}

.back-link:hover{ color: var(--ink-soft); }

/* ---- Generic section heading ---- */
.section-heading-spaced{ margin-top: 32px; }

.section-heading{
  font-family: var(--font-body);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--ink);
  margin: 0 0 4px;
}

.section-sub{
  color: var(--ink-soft);
  font-size: 0.88rem;
  margin-bottom: 20px;
}

/* ---- Card ---- */
.card{
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 28px 30px;
  margin-bottom: 16px;
}

.card-link{
  display: block;
  text-decoration: none;
  transition: box-shadow 0.15s ease, border-color 0.15s ease;
}

.card-link:hover .card{
  border-color: #D1D5DB;
  box-shadow: 0 2px 6px rgba(16,24,40,0.08);
}

.card-top{
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}

.card-arrow{
  color: var(--ink-faint);
  font-size: 1.1rem;
  line-height: 1;
}

/* ---- Pills ---- */
.pill{
  display: inline-flex;
  align-items: center;
  font-size: 0.76rem;
  font-weight: 600;
  padding: 4px 13px;
  border-radius: 999px;
}

.pill-green{ background: var(--pill-green-bg); color: var(--pill-green-text); }
.pill-gray{ background: var(--pill-gray-bg); color: var(--pill-gray-text); }
.pill-amber{ background: var(--pill-amber-bg); color: var(--pill-amber-text); }

/* ---- Card title styles ---- */
.card-title{
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--ink);
  margin: 14px 0 10px;
  line-height: 1.3;
}

.card-title.upper{
  text-transform: uppercase;
  letter-spacing: 0.01em;
}

.card-title.small{
  font-size: 1.05rem;
  margin: 10px 0 6px;
}

.card-desc{
  color: var(--ink-soft);
  font-size: 0.93rem;
  margin-bottom: 18px;
  line-height: 1.6;
}

.card-desc:last-child{ margin-bottom: 0; }

/* ---- Meta rows with icons ---- */
.meta-row{
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 0.87rem;
  color: var(--ink-soft);
  margin-bottom: 6px;
}

.meta-row:last-child{ margin-bottom: 0; }

.meta-icon{
  flex-shrink: 0;
  font-size: 0.95rem;
}

/* ---- Day toggle (segmented control, page-local — not a site navbar) ---- */
.day-toggle{
  display: flex;
  gap: 8px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.day-toggle button{
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 600;
  background: var(--pill-gray-bg);
  border: 1px solid transparent;
  color: var(--ink-soft);
  padding: 8px 16px;
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.day-toggle button:hover{ color: var(--ink); }

.day-toggle button.active{
  background: var(--ink);
  color: #fff;
}

.day-toggle button:focus-visible{ outline: 2px solid var(--ink); outline-offset: 2px; }

/* ---- Schedule list (programs page) ---- */
.day-panel{ display: none; }
.day-panel.active{ display: block; }

.day-date{
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--ink);
  margin-bottom: 6px;
  padding: 0 2px 16px;
  border-bottom: 1px solid var(--border);
}

.entry{
  display: grid;
  grid-template-columns: 84px 1fr;
  gap: 18px;
  padding: 16px 2px;
  border-bottom: 1px solid var(--border);
}

.entry:last-child{ border-bottom: none; }

.entry.is-now{
  background: #FAFBFC;
  margin: 0 -16px;
  padding: 16px 16px;
  border-radius: 10px;
  border-bottom-color: transparent;
}

.entry-time{
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 0.85rem;
  color: var(--ink-faint);
  padding-top: 1px;
  white-space: nowrap;
}

.entry.is-now .entry-time{ color: var(--pill-green-text); font-weight: 700; }

.entry-type{
  display: inline-block;
  font-size: 0.7rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--ink-faint);
  margin-bottom: 4px;
}

.entry-title{
  font-family: var(--font-body);
  font-size: 0.98rem;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 2px;
}

.entry-desc{
  font-size: 0.87rem;
  color: var(--ink-soft);
  margin-bottom: 4px;
  line-height: 1.5;
}

.entry-meta{
  font-size: 0.85rem;
  color: var(--ink-soft);
}

.entry-note{
  display: inline-block;
  margin-top: 7px;
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--pill-amber-text);
  background: var(--pill-amber-bg);
  padding: 2px 10px;
  border-radius: 999px;
}

.day-emcee{
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid var(--border);
  color: var(--ink-soft);
  font-size: 0.88rem;
  text-align: center;
}

/* ---- Current session panel ---- */
.now-panel{
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 32px;
  margin-bottom: 20px;
}

.now-title{
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 700;
  font-size: 1.6rem;
  color: var(--ink);
  margin: 14px 0 14px;
  line-height: 1.3;
}

.now-time{
  color: var(--ink-soft);
  font-size: 0.92rem;
  margin-bottom: 16px;
}

.now-meta{
  font-size: 0.93rem;
  color: var(--ink-soft);
}

.now-meta strong{ font-weight: 600; color: var(--ink); }

.now-next{
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid var(--border);
  font-size: 0.87rem;
  color: var(--ink-soft);
}

.now-next strong{ color: var(--ink); font-weight: 600; }

/* ---- Announcements ---- */
.announcement{
  padding: 22px 0;
  border-bottom: 1px solid var(--border);
  display: grid;
  grid-template-columns: 96px 1fr;
  gap: 22px;
}

.announcement:last-child{ border-bottom: none; }

.announcement-date{
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.78rem;
  letter-spacing: 0.02em;
  color: var(--ink-faint);
  padding-top: 2px;
}

.announcement h3{
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 600;
  color: var(--ink);
  margin: 0 0 5px;
}

.announcement p{
  color: var(--ink-soft);
  font-size: 0.91rem;
  margin: 0;
  max-width: 58ch;
}

/* ---- Announcement enhancements (type tags, two-line date, urgent, live) ---- */
.announcement.is-urgent{
  margin: 0 -16px;
  padding: 22px 16px;
  border-left: 3px solid var(--pill-amber-text);
  background: #FFFDF6;
  border-radius: 10px;
  border-bottom-color: transparent;
}

.announcement-date{
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.announcement-rel{
  font-weight: 600;
  font-size: 0.82rem;
  letter-spacing: 0.02em;
  color: var(--ink);
}

.announcement-abs{
  font-size: 0.74rem;
  font-weight: 400;
  color: var(--ink-faint);
}

.announcement-tags{
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 10px;
}

.empty-state{
  color: var(--ink-soft);
  font-size: 0.95rem;
  padding: 24px 0;
}

/* ---- Feedback form ---- */
.feedback-form{ padding: 30px 32px; }

.form-field{ margin-bottom: 22px; }

.form-field label{
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 8px;
}

.form-field .optional{
  font-weight: 400;
  color: var(--ink-faint);
}

.feedback-form select,
.feedback-form textarea,
.feedback-form input[type="text"],
.feedback-form input[type="password"]{
  width: 100%;
  font-family: var(--font-body);
  font-size: 0.92rem;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 11px 13px;
}

.feedback-form select:focus-visible,
.feedback-form textarea:focus-visible,
.feedback-form input[type="text"]:focus-visible,
.feedback-form input[type="password"]:focus-visible{
  outline: 2px solid var(--ink);
  outline-offset: 1px;
  border-color: var(--ink);
}

.feedback-form textarea{ resize: vertical; }

.session-meta{
  background: var(--page-bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px 16px;
  margin: -6px 0 24px;
}

.session-meta .meta-row{ margin-bottom: 6px; }
.session-meta .meta-row:last-child{ margin-bottom: 0; }

.q-list{
  border-top: 1px solid var(--border);
  margin-bottom: 6px;
}

fieldset.q{
  border: 0;
  padding: 18px 0;
  margin: 0;
  border-bottom: 1px solid var(--border);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 10px 16px;
}

fieldset.q legend{
  float: left;
  font-size: 0.94rem;
  color: var(--ink);
  padding: 0;
}

fieldset.q .q-num{
  color: var(--ink-faint);
  font-weight: 600;
  margin-right: 4px;
}

/* Star rating — accessible radios rendered 5→1, filled left-to-right via CSS */
.stars{
  display: inline-flex;
  flex-direction: row-reverse;
  justify-content: flex-end;
  gap: 2px;
}

.stars input{
  position: absolute;
  width: 1px; height: 1px;
  opacity: 0;
  overflow: hidden;
}

.stars label{
  font-size: 1.7rem;
  line-height: 1;
  color: #D7DBE0;
  cursor: pointer;
  padding: 0 1px;
  transition: color 0.1s ease, transform 0.1s ease;
}

.stars input:checked ~ label{ color: var(--star); }
.stars:hover label{ color: #D7DBE0; }
.stars label:hover,
.stars label:hover ~ label{ color: var(--star); }
.stars label:hover{ transform: scale(1.12); }
.stars input:focus-visible + label{ outline: 2px solid var(--ink); outline-offset: 2px; border-radius: 3px; }

.form-error{
  color: var(--pill-amber-text);
  background: var(--pill-amber-bg);
  border-radius: 10px;
  padding: 10px 14px;
  font-size: 0.88rem;
  margin: 14px 0;
}

.btn-primary{
  font-family: var(--font-body);
  font-size: 0.92rem;
  font-weight: 600;
  color: #fff;
  background: var(--ink);
  border: 0;
  border-radius: 999px;
  padding: 12px 26px;
  margin-top: 20px;
  cursor: pointer;
  transition: opacity 0.15s ease;
}

.btn-primary:hover{ opacity: 0.9; }
.btn-primary:focus-visible{ outline: 2px solid var(--ink); outline-offset: 2px; }

.btn-secondary{
  font-family: var(--font-body);
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--ink);
  background: var(--pill-gray-bg);
  border: 0;
  border-radius: 999px;
  padding: 10px 22px;
  margin-top: 18px;
  cursor: pointer;
}

.btn-secondary:hover{ color: #000; }
.btn-secondary:focus-visible{ outline: 2px solid var(--ink); outline-offset: 2px; }

.thankyou-title{
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 700;
  font-size: 1.5rem;
  color: var(--ink);
  margin: 14px 0 12px;
}

.preview-note{
  font-size: 0.82rem;
  color: var(--ink-faint);
  margin: 14px 0 0;
}

.rate-link{
  display: inline-block;
  margin-top: 18px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--ink);
  background: var(--pill-amber-bg);
  border-radius: 999px;
  padding: 9px 18px;
  text-decoration: none;
}

.rate-link:hover{ background: #FDE9A9; }
.rate-link:focus-visible{ outline: 2px solid var(--ink); outline-offset: 2px; }

/* ---- Announcements admin (localStorage, no backend) ---- */
.admin-note{
  background: var(--pill-amber-bg);
  color: var(--pill-amber-text);
  border-radius: 10px;
  padding: 12px 16px;
  font-size: 0.85rem;
  margin-bottom: 20px;
}

.checkbox-row{
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 22px;
}

.checkbox-row input{ width: 17px; height: 17px; }
.checkbox-row label{ margin: 0; font-weight: 500; }

.admin-list{ margin-top: 8px; }

.admin-item{
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 14px;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
}

.admin-item:last-child{ border-bottom: none; }

.admin-item-title{ font-weight: 600; font-size: 0.94rem; }
.admin-item-meta{ font-size: 0.8rem; color: var(--ink-faint); margin-top: 2px; }

.btn-delete{
  flex-shrink: 0;
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 600;
  color: #B42318;
  background: #FEF3F2;
  border: 0;
  border-radius: 999px;
  padding: 6px 14px;
  cursor: pointer;
}

.btn-delete:hover{ background: #FEE4E2; }
.btn-delete:focus-visible{ outline: 2px solid #B42318; outline-offset: 2px; }

.admin-tabs{
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 20px;
}

.tab-button{
  font-family: var(--font-body);
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--ink-soft);
  background: var(--pill-gray-bg);
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 9px 16px;
  cursor: pointer;
}

.tab-button[aria-selected="true"]{
  color: #fff;
  background: var(--ink);
}

.tab-panel[hidden]{ display: none; }

.summary-strip{
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 24px;
}

.stat{
  flex: 1 1 140px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px 20px;
}

.stat-num{
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.9rem;
  color: var(--ink);
  line-height: 1;
}

.stat-label{
  font-size: 0.78rem;
  color: var(--ink-faint);
  margin-top: 6px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.score-row{
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 9px 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.9rem;
}

.score-row:last-child{ border-bottom: none; }
.score-q{ color: var(--ink-soft); }
.score-val{ font-weight: 700; color: var(--ink); white-space: nowrap; }
.score-val .of{ color: var(--ink-faint); font-weight: 400; font-size: 0.82rem; }
.session-count{ font-size: 0.82rem; color: var(--ink-faint); font-weight: 500; }
.admin-actions{ display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }
.resp-comment{ font-size: 0.86rem; color: var(--ink-soft); margin-top: 4px; font-style: italic; }

/* ---- Home page event facts ---- */
.event-facts{
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

footer.page-footer{
  margin-top: 48px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  color: var(--ink-faint);
  font-size: 0.8rem;
}

@media (max-width: 600px){
  .wrap{ padding: 36px 18px 60px; }
  .masthead{ align-items: flex-start; }
  .masthead h1{ font-size: 1.4rem; }
  .masthead-logo{ width: 42px; height: 42px; }
  .card{ padding: 22px 20px; }
  .entry{ grid-template-columns: 68px 1fr; gap: 12px; }
  .announcement{ grid-template-columns: 1fr; gap: 6px; }
  .event-facts{ grid-template-columns: 1fr; gap: 10px; }
  .now-title{ font-size: 1.3rem; }
  .feedback-form{ padding: 22px 20px; }
  fieldset.q{ justify-content: flex-start; }
  .stars label{ font-size: 1.9rem; }
}
