/* ============================================================
   AI for Economic Research — shared stylesheet
   Base rules carried over from the course syllabus so every
   page reads as one system; component classes added below.
   ============================================================ */

body {
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	line-height: 1.7;
	background-color: #f8f9fa;
	color: #343a40;
	margin: 0;
	padding: 0;
}
.container {
	max-width: 950px;
	margin: 30px auto;
	padding: 30px 40px;
	background-color: #ffffff;
	border-radius: 12px;
	box-shadow: 0 6px 18px rgba(0,0,0,0.06);
}
h1 {
	font-size: 2.2em;
	color: #003366;
	border-bottom: 3px solid #0056b3;
	padding-bottom: 15px;
	margin-bottom: 20px;
	font-weight: 700;
}
h2 {
	font-size: 1.7em;
	color: #003366;
	border-bottom: 2px solid #e9ecef;
	padding-bottom: 10px;
	margin-top: 40px;
	margin-bottom: 20px;
	font-weight: 600;
}
h3 {
	font-size: 1.35em;
	color: #0056b3;
	margin-top: 25px;
	margin-bottom: 10px;
	font-weight: 600;
}
.instructor-info {
	background-color: #f8f9fa;
	border-left: 5px solid #0056b3;
	padding: 15px 25px;
	margin-bottom: 25px;
	border-radius: 0 8px 8px 0;
}
.instructor-info p { margin: 6px 0; font-size: 1.05em; }
.instructor-info a { color: #0056b3; text-decoration: none; font-weight: 500; }
.instructor-info a:hover { text-decoration: underline; }
p, li { font-size: 1.05em; margin-bottom: 8px; }
ul { list-style-type: none; padding-left: 25px; }
li { position: relative; padding-left: 20px; margin-bottom: 6px; }
li::before {
	content: '\2022';
	color: #0056b3;
	font-weight: bold;
	display: inline-block;
	width: 1em;
	margin-left: -20px;
	position: absolute;
	top: 0;
}
ul ul { margin-top: 6px; padding-left: 20px; }
ul ul li::before { content: '\2013'; color: #555; font-weight: normal; }
code {
	font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, Courier, monospace;
	background-color: #e9ecef;
	padding: 2px 5px;
	border-radius: 4px;
	font-size: 0.93em;
}
.session-box {
	background-color: #fdfdfd;
	border: 1px solid #e0e0e0;
	border-left: 5px solid #0056b3;
	padding: 18px 22px;
	margin: 18px 0;
	border-radius: 0 8px 8px 0;
}
.session-box h3 { margin-top: 0; color: #003366; }
.session-meta { font-size: 0.95em; color: #555; margin-bottom: 10px; }
.lab-tag {
	display: inline-block;
	background-color: #fff3e0;
	border: 1px solid #ff9800;
	color: #e65100;
	padding: 2px 8px;
	border-radius: 4px;
	font-size: 0.85em;
	font-weight: 600;
}
.competency-box {
	background-color: #fdfdfd;
	border: 1px solid #e0e0e0;
	border-left: 5px solid #17a2b8;
	padding: 18px 22px;
	margin: 20px 0;
	border-radius: 0 8px 8px 0;
}
.competency-box h3 { margin-top: 0; color: #17a2b8; }
.ecosystem-box {
	background: linear-gradient(135deg, #f0f7ff 0%, #fff8f0 100%);
	border: 1px solid #ccd;
	border-left: 5px solid #003366;
	padding: 18px 24px;
	margin: 25px 0;
	border-radius: 0 8px 8px 0;
}
.ecosystem-box h3 { margin-top: 0; color: #003366; font-size: 1.15em; }
.ecosystem-box .eco-arrow { color: #0056b3; font-weight: 700; margin: 0 8px; }
.supp-box {
	background-color: #f0f7ff;
	border: 1px solid #b3d4fc;
	padding: 18px 22px;
	margin: 18px 0;
	border-radius: 8px;
}
.supp-box h3 { margin-top: 0; color: #003366; }
a { color: #0056b3; text-decoration: none; }
a:hover { text-decoration: underline; }
table {
	width: 100%;
	border-collapse: collapse;
	margin: 15px 0;
	font-size: 0.95em;
}
th, td { border: 1px solid #dee2e6; padding: 10px 12px; text-align: left; }
th { background-color: #f8f9fa; color: #003366; font-weight: 600; }
tr:nth-child(even) { background-color: #f8f9fa; }

/* ============================================================
   Component classes — landing / slides / labs pages
   ============================================================ */

/* Top navigation bar */
.topnav {
	display: flex;
	flex-wrap: wrap;
	gap: 8px 18px;
	align-items: center;
	font-size: 0.98em;
	margin: -6px 0 22px;
	padding-bottom: 14px;
	border-bottom: 1px solid #e9ecef;
}
.topnav a { font-weight: 600; }
.topnav .sep { color: #ced4da; }
.topnav .home { color: #003366; }

/* Quick-link buttons row on the landing page */
.quicklinks {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
	gap: 14px;
	margin: 24px 0 8px;
}
.quicklink {
	display: block;
	text-decoration: none;
	background: #fdfdfd;
	border: 1px solid #e0e0e0;
	border-left: 5px solid #0056b3;
	border-radius: 0 8px 8px 0;
	padding: 16px 20px;
	transition: box-shadow .15s, transform .15s;
}
.quicklink:hover { box-shadow: 0 4px 12px rgba(0,0,0,0.08); transform: translateY(-1px); text-decoration: none; }
.quicklink .ql-title { font-weight: 700; color: #003366; font-size: 1.1em; }
.quicklink .ql-sub { color: #666; font-size: 0.9em; }

/* Lecture card grid */
.lecture-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
	gap: 16px;
	margin: 18px 0;
}
.lecture-card {
	border: 1px solid #e0e0e0;
	border-radius: 8px;
	padding: 16px 18px;
	background: #fdfdfd;
}
.lecture-card .lec-num {
	font-size: 0.8em;
	font-weight: 700;
	color: #0056b3;
	letter-spacing: .05em;
	text-transform: uppercase;
}
.lecture-card .lec-title { font-weight: 600; color: #003366; margin: 2px 0 10px; display: block; }
.lecture-card .lec-links { font-size: 0.92em; }
.lecture-card .lec-links a { margin-right: 12px; }

/* Status badges */
.badge {
	display: inline-block;
	padding: 1px 8px;
	border-radius: 20px;
	font-size: 0.78em;
	font-weight: 600;
	vertical-align: middle;
}
.badge-ready { background: #e6f4ea; border: 1px solid #34a853; color: #137333; }
.badge-soon  { background: #f1f3f4; border: 1px solid #bdc1c6; color: #5f6368; }
.badge-lock  { background: #fff3e0; border: 1px solid #ff9800; color: #e65100; }

/* Codespaces / action button */
.btn {
	display: inline-block;
	background: #0056b3;
	color: #fff !important;
	padding: 9px 16px;
	border-radius: 6px;
	font-weight: 600;
	font-size: 0.95em;
	text-decoration: none;
}
.btn:hover { background: #003f86; text-decoration: none; }
.btn-ghost { background: #fff; color: #0056b3 !important; border: 1px solid #0056b3; }
.btn-ghost:hover { background: #f0f7ff; }

/* Download / resource list rows */
.res-row {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 10px 14px;
	padding: 12px 0;
	border-bottom: 1px solid #eee;
}
.res-row:last-child { border-bottom: none; }
.res-row .res-name { font-weight: 600; color: #003366; flex: 1; min-width: 200px; }

/* Callout / notice box */
.notice {
	background: #fff8e1;
	border: 1px solid #ffe082;
	border-left: 5px solid #ffb300;
	border-radius: 0 8px 8px 0;
	padding: 14px 20px;
	margin: 18px 0;
	font-size: 0.97em;
}
.notice.info { background: #f0f7ff; border-color: #b3d4fc; border-left-color: #0056b3; }

/* Footer */
.site-footer {
	max-width: 950px;
	margin: 0 auto 40px;
	padding: 18px 40px;
	color: #8a929a;
	font-size: 0.85em;
	text-align: center;
}

@media (max-width: 640px) {
	.container { margin: 12px; padding: 20px 18px; }
	h1 { font-size: 1.7em; }
}

/* ============================================================
   Discussion forum (forum/index.html)
   ============================================================ */
.forum-about { background: #f0f7ff; border: 1px solid #b3d4fc; border-radius: 8px; padding: 10px 18px; margin: 0 0 20px; }
.forum-about summary { cursor: pointer; color: #003366; }
.forum-about ul { margin: 10px 0 4px; }
.forum-muted { color: #6c757d; font-size: 0.93em; }
.forum-h2 { font-size: 1.45em; margin-top: 6px; }
.forum-h3 { font-size: 1.1em; margin: 0 0 8px; color: #003366; }
.forum-panel { max-width: 640px; }
.forum-userbar { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 16px; font-size: 0.95em;
	color: #555; padding: 8px 0 12px; border-bottom: 1px solid #e9ecef; margin-bottom: 14px; }
.forum-userbar-actions a { margin-left: 14px; }
.forum-toolbar { display: flex; flex-wrap: wrap; gap: 8px 10px; align-items: center; margin-bottom: 12px; }
.forum-toolbar input[type=search] { flex: 1; min-width: 160px; }
.forum-toolbar select, .forum-toolbar input, .forum-form input[type=text], .forum-form input[type=email],
.forum-form select, .forum-form textarea {
	font: inherit; font-size: 0.97em; padding: 8px 10px; border: 1px solid #ced4da; border-radius: 6px; background: #fff; box-sizing: border-box; }
.forum-toolbar button.btn, .forum-form button.btn { border: 1px solid #0056b3; cursor: pointer; font: inherit; font-weight: 600; font-size: 0.95em; }
.forum-form { display: flex; flex-direction: column; gap: 12px; }
.forum-form label { display: flex; flex-direction: column; gap: 4px; font-weight: 600; color: #003366; font-size: 0.95em; }
.forum-form textarea { width: 100%; min-height: 140px; font-family: "SFMono-Regular", Consolas, Menlo, monospace; font-size: 0.92em; line-height: 1.5; }
.forum-form label.forum-anon { flex-direction: row; flex-wrap: wrap; align-items: baseline; gap: 6px; font-weight: 600; }
.forum-anon-note { font-weight: 400; flex-basis: 100%; }
.forum-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.forum-catinfo { color: #555; font-size: 0.95em; margin: 0 0 8px; }
.forum-list { border-top: 1px solid #e9ecef; }
.forum-row { display: flex; gap: 14px; align-items: center; padding: 12px 6px; border-bottom: 1px solid #e9ecef; color: inherit; }
.forum-row:hover { background: #f8f9fa; text-decoration: none; }
.forum-row.is-pinned { background: #fffdf2; }
.forum-row.is-hidden { opacity: 0.6; }
.forum-row-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.forum-row-title { font-weight: 600; color: #003366; overflow-wrap: anywhere; }
.forum-row-meta { font-size: 0.88em; color: #6c757d; }
.forum-row-count { text-align: center; min-width: 52px; font-weight: 700; color: #0056b3; font-size: 1.1em; line-height: 1.1; }
.forum-row-count small { display: block; font-weight: 400; font-size: 0.68em; color: #6c757d; }
.forum-chip { display: inline-block; background: #e9ecef; border-radius: 4px; padding: 0 6px; margin-right: 6px; font-size: 0.92em; color: #495057; }
.forum-badge { display: inline-block; padding: 0 7px; margin-right: 6px; border-radius: 20px; font-size: 0.74em; font-weight: 600; vertical-align: middle; }
.forum-badge-instr { background: #e8f0fe; border: 1px solid #0056b3; color: #0056b3; margin-left: 6px; }
.forum-badge-pin { background: #fff3e0; border: 1px solid #ff9800; color: #e65100; }
.forum-badge-ok { background: #e6f4ea; border: 1px solid #34a853; color: #137333; }
.forum-badge-lock { background: #f1f3f4; border: 1px solid #bdc1c6; color: #5f6368; }
.forum-revealed { margin-left: 6px; color: #8a5a00; font-size: 0.9em; }
.forum-thread-head { margin-bottom: 8px; }
.forum-thread-head .forum-h2 { border-bottom: none; margin-bottom: 4px; overflow-wrap: anywhere; }
.forum-modbar { display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: center; font-size: 0.92em; padding: 6px 10px;
	background: #f8f9fa; border-radius: 6px; margin-bottom: 8px; }
.forum-posts { display: flex; flex-direction: column; gap: 12px; margin: 10px 0 24px; }
.forum-post { border: 1px solid #e0e0e0; border-radius: 8px; padding: 12px 16px; background: #fff; }
.forum-post.is-opening { border-left: 5px solid #0056b3; }
.forum-post.is-endorsed { border-left: 5px solid #34a853; }
.forum-post.is-hidden { background: #f8f9fa; opacity: 0.75; }
.forum-post-head { font-size: 0.92em; margin-bottom: 6px; display: flex; flex-wrap: wrap; gap: 2px 6px; align-items: baseline; }
.forum-post-actions { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; margin-top: 8px; font-size: 0.9em; }
.forum-body { overflow-wrap: anywhere; }
.forum-body p { margin: 0 0 8px; }
.forum-body pre { background: #f6f8fa; border: 1px solid #e9ecef; border-radius: 6px; padding: 10px 12px; overflow-x: auto; font-size: 0.88em; line-height: 1.45; }
.forum-body pre code { background: none; padding: 0; }
.forum-body blockquote { border-left: 3px solid #ced4da; margin: 6px 0; padding: 2px 12px; color: #555; }
.forum-body .katex-display { overflow-x: auto; overflow-y: hidden; padding: 2px 0; }
.forum-body img { max-width: 100%; }
.forum-body ul { padding-left: 22px; }
.forum-quote { display: block; border-left: 3px solid #b3d4fc; background: #f0f7ff; padding: 4px 10px; margin: 0 0 8px;
	font-size: 0.9em; color: #495057; border-radius: 0 6px 6px 0; text-decoration: none; }
.forum-linkbtn { background: none; border: none; padding: 0; color: #0056b3; font: inherit; cursor: pointer; }
.forum-linkbtn:hover { text-decoration: underline; }
.forum-vote { background: #fff; border: 1px solid #ced4da; border-radius: 20px; padding: 1px 10px; font: inherit; font-size: 0.95em; cursor: pointer; color: #495057; }
.forum-vote.is-on { background: #e8f0fe; border-color: #0056b3; color: #0056b3; }
.forum-vote:disabled { cursor: default; opacity: 0.6; }
.forum-editor-bar { display: flex; justify-content: flex-end; font-size: 0.9em; }
.forum-preview { border: 1px dashed #ced4da; border-radius: 6px; padding: 10px 12px; min-height: 80px; }
.forum-reply { border-top: 2px solid #e9ecef; padding-top: 14px; }
.forum-flash { position: sticky; top: 8px; z-index: 5; }
@media (max-width: 640px) {
	.forum-row { padding: 10px 2px; }
	.forum-row-count { min-width: 40px; }
	.forum-userbar-actions a { margin-left: 0; margin-right: 14px; }
	.forum-toolbar .btn { flex: 1; text-align: center; }
}
/* "Discuss" link beside a heading (assignments page) */
h2 .forum-discuss { font-size: 0.55em; font-weight: 600; margin-left: 6px; vertical-align: middle; }
