/* Responsive UI + top-right auth */
:root{
  --bg:#0b1020;
  --panel:#101a33;
  --panel2:#0f1730;
  --text:#e9eefc;
  --muted:#b9c6ea;
  --border:rgba(255,255,255,.12);
  --accent:#6ea8fe;
  --accent2:#8bd3ff;
  --danger:#ff6b6b;
  --ok:#58d68d;
  --warn:#ffd166;
  --shadow:0 8px 30px rgba(0,0,0,.35);
  --radius:14px;
}
*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  background: radial-gradient(1200px 600px at 20% 0%, #182556 0%, var(--bg) 55%);
  color:var(--text);
}
a{color:inherit}
.wrap{max-width:1100px; margin:0 auto; padding:14px}
.topbar{
  position:sticky; top:0; z-index:10;
  background: linear-gradient(180deg, rgba(11,16,32,.92), rgba(11,16,32,.70));
  border-bottom:1px solid var(--border);
  backdrop-filter: blur(8px);
}
.topbar-inner{display:flex; align-items:center; justify-content:space-between; gap:10px}
.brand{display:flex; align-items:center; gap:12px; min-width:0}
.logo{
  width:44px; height:44px; border-radius:12px;
  display:grid; place-items:center;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  color:#071025; font-weight:800;
  box-shadow: var(--shadow);
  flex:0 0 auto;
}
.brand-text{min-width:0}
.brand-title{font-weight:800; letter-spacing:.2px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis}
.brand-sub{color:var(--muted); font-size:.9rem; white-space:nowrap; overflow:hidden; text-overflow:ellipsis}
.auth{display:flex; align-items:center; gap:8px; flex:0 0 auto}
.badge{
  display:inline-flex; align-items:center; gap:6px;
  padding:4px 9px; border-radius:999px;
  border:1px solid var(--border);
  background: rgba(255,255,255,.05);
  color: var(--muted);
  font-size:.85rem;
  max-width:42vw;
  white-space:nowrap; overflow:hidden; text-overflow:ellipsis;
}
.card{
  background: linear-gradient(180deg, rgba(16,26,51,.92), rgba(15,23,48,.92));
  border:1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding:14px;
}
.card h1,.card h2,.card h3{margin:.2rem 0 .6rem 0}
.muted{color:var(--muted)}
.small{font-size:.92rem}
.k{font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace}
.grid{display:grid; grid-template-columns:1fr; gap:12px}
@media (min-width:720px){ .grid{grid-template-columns:1fr 1fr;} }
@media (min-width:980px){ .grid{grid-template-columns:1fr 1fr 1fr;} }
@media (min-width:1200px){ .footer .grid{grid-template-columns:1fr 1fr 1fr 1fr;} }
.row{display:flex; gap:12px; flex-wrap:wrap; align-items:end}
.field{display:flex; flex-direction:column; gap:6px; flex:1; min-width:220px}
.field label{font-size:.92rem; color:var(--muted)}
input,select,textarea{
  width:100%;
  background-color: #111828 !important;
  color: #e8eaf0 !important;
  border:1px solid var(--border);
  border-radius: 12px;
  padding:10px 12px;
  outline:none;
  color-scheme: dark;
  -webkit-appearance: auto;
}
select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%236ea8fe' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
}
select option {
  background-color: #111828 !important;
  color: #e8eaf0 !important;
}
select option:hover, select option:checked {
  background-color: #1d2d4a !important;
}
textarea{min-height:110px; resize:vertical}
input:focus,select:focus,textarea:focus{border-color: rgba(110,168,254,.6)}
.btn{
  display:inline-flex; align-items:center; justify-content:center;
  gap:10px;
  text-decoration:none;
  padding:10px 14px;
  border-radius: 12px;
  border:1px solid var(--border);
  background: rgba(255,255,255,.06);
  color: var(--text);
  cursor:pointer;
  user-select:none;
  white-space:nowrap;
}
.btn.primary{
  background: linear-gradient(135deg, rgba(110,168,254,.95), rgba(139,211,255,.85));
  color:#071025;
  border-color: rgba(0,0,0,.08);
  font-weight:700;
}
.btn.danger{background: rgba(255,107,107,.15); border-color: rgba(255,107,107,.35)}
.btn:active{transform: translateY(1px)}
.sep{border:0; border-top:1px solid var(--border); margin:12px 0}
.notice{padding:10px 12px; border-radius:12px; border:1px solid var(--border); background: rgba(255,255,255,.04)}
.table{width:100%; border-collapse:collapse; overflow:hidden; border-radius:12px; border:1px solid var(--border)}
.table th,.table td{padding:10px 10px; border-bottom:1px solid var(--border); text-align:left; vertical-align:top}
.table th{font-size:.92rem; color:var(--muted); background: rgba(255,255,255,.04)}
.table tr:last-child td{border-bottom:none}
.status{
  display:inline-flex; align-items:center; gap:8px;
  padding:5px 10px; border-radius:999px;
  border:1px solid var(--border);
  background: rgba(255,255,255,.05);
  font-size:.86rem;
}
.status.ok{border-color: rgba(88,214,141,.45); background: rgba(88,214,141,.12)}
.status.warn{border-color: rgba(255,209,102,.45); background: rgba(255,209,102,.12)}
.status.danger{border-color: rgba(255,107,107,.45); background: rgba(255,107,107,.12)}
.footer{padding:18px 14px; opacity:.9}

/* ---- Navigation ---- */
.nav {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: nowrap;
}
.nav a {
  color: var(--text);
  text-decoration: none;
  opacity: .80;
  font-size: .92rem;
  white-space: nowrap;
}
.nav a:hover, .nav a.active { opacity: 1; }
.nav a.active { font-weight: 600; }

/* ---- Dropdown ---- */
.nav-dropdown { position: relative; }
.nav-dropdown-btn {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text);
  opacity: .80;
  font-size: .92rem;
  font-family: inherit;
  padding: 0;
  white-space: nowrap;
}
.nav-dropdown-btn:hover,
.nav-dropdown-btn[aria-expanded="true"] { opacity: 1; }

.nav-dropdown-menu {
  display: none;
  position: absolute;
  top: calc(100% + 12px);
  right: 0;
  min-width: 240px;
  background: #0d1528;
  border: 1px solid rgba(255,255,255,.15);
  border-radius: 10px;
  box-shadow: 0 12px 40px rgba(0,0,0,.5);
  z-index: 9999;
  padding: 8px 0;
}
.nav-dropdown-menu.open { display: block; }

.nav-dropdown-menu a {
  display: block;
  padding: 8px 18px;
  color: var(--text);
  text-decoration: none;
  font-size: .88rem;
  opacity: .85;
  white-space: nowrap;
}
.nav-dropdown-menu a:hover { opacity: 1; background: rgba(110,168,254,.10); }
.nav-dropdown-menu a.muted-link {
  opacity: .35;
  pointer-events: none;
  font-style: italic;
}
.dropdown-section-label {
  padding: 8px 18px 3px;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: var(--accent);
  opacity: .75;
}
.dropdown-sep {
  border: none;
  border-top: 1px solid rgba(255,255,255,.10);
  margin: 5px 0;
}

/* ---- Mobile nav ---- */
@media (max-width: 768px) {
  .nav { gap: 10px; }
  .nav > a:not(.btn) { display: none; }
  .nav-dropdown { display: none; }
  .nav-mobile-menu { display: block; }
}
@media (min-width: 769px) {
  .nav-mobile-menu { display: none; }
}

/* ============================================================
   ACADEMIC CONTENT STYLES — Week lesson pages (.card.content)
   Applied via <section class="card content"> in all week files
   ============================================================ */

/* Body text — serif for reading comfort, academic feel */
.content {
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 1.01rem;
  line-height: 1.8;
  color: var(--text);
}

/* Readable measure for paragraphs and lists */
.content p,
.content ol,
.content ul,
.content blockquote {
  max-width: 700px;
  margin-bottom: 1.1em;
}

/* Week identifier — e.g. "THEO201 — Week 1" */
.content h1 {
  font-family: system-ui, -apple-system, Segoe UI, sans-serif;
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--accent);
  margin: .2rem 0 .1rem;
}

/* Week title — the actual lesson name */
.content h2 {
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 1.55rem;
  font-weight: 700;
  line-height: 1.25;
  color: var(--text);
  margin: 0 0 1.2rem;
  letter-spacing: -.01em;
}

/* h2.muted used as subtitle under h1 in week files */
.content h2.muted {
  font-size: 1.25rem;
  font-weight: 400;
  font-style: italic;
  color: var(--muted);
  margin: .1rem 0 1.4rem;
  letter-spacing: 0;
}

/* Section headings — e.g. "Guided Reflection Questions" */
.content h3 {
  font-family: system-ui, -apple-system, Segoe UI, sans-serif;
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .09em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 2rem 0 .8rem;
  padding-bottom: .4rem;
  border-bottom: 1px solid var(--border);
  max-width: 700px;
}

/* Scripture references in parentheses feel natural in serif */
.content em { font-style: italic; color: var(--muted); }

/* Lesson body paragraphs */
.content > p,
.content section p { margin-top: 0; }

/* Ordered / unordered lists */
.content ol,
.content ul {
  padding-left: 1.5rem;
}
.content li {
  margin-bottom: .55em;
  line-height: 1.75;
}

/* Blockquotes — for source material or key statements */
.content blockquote {
  border-left: 3px solid var(--accent);
  padding: .5rem 1rem .5rem 1.2rem;
  margin-left: 0;
  color: var(--muted);
  font-style: italic;
  background: rgba(110,168,254,.04);
  border-radius: 0 6px 6px 0;
}

/* Back navigation link at top of week pages */
.content > p.muted.small:first-child {
  font-family: system-ui, -apple-system, Segoe UI, sans-serif;
  font-size: .78rem;
  margin-bottom: 1rem;
}

/* Reflection textarea — parchment-feel within dark theme */
#reflectionText {
  font-family: Georgia, 'Times New Roman', serif;
  font-size: .95rem;
  line-height: 1.7;
}
