/* ------------------------------------------------------------------ *
 * Membership feed + community — design language borrowed from the
 * Ethical AI Foundations page: soft navy-tinted cards, serif titles,
 * colored accent stripes, Slack-style student posts.
 * ------------------------------------------------------------------ */

:root {
	--iwai-navy: #00538c;
	--iwai-green: #1f7a4d;
	--iwai-gold: #8a6608;
	--iwai-border: #dce3ea;
	--iwai-shadow: 0 2px 6px rgba(9, 54, 91, 0.08);
	--iwai-text: #111;
	--iwai-muted: #687380;
	--iwai-body: #3f4a54;
}

.iwai-community-feed {
	max-width: 640px;
	margin: 0 auto;
}

/* Form controls default to the UA font (monospace textareas, Arial inputs/
   buttons); make them inherit the active theme's font instead. */
.iwai-membership input,
.iwai-membership textarea,
.iwai-membership button,
.iwai-membership select {
	font-family: inherit;
}

/* ---- Composer ---- */

.iwai-composer {
	background: #fff;
	border: 1px solid var(--iwai-border);
	border-radius: 12px;
	box-shadow: var(--iwai-shadow);
	padding: 14px 16px;
	margin-bottom: 22px;
}

.iwai-composer-titlerow {
	display: flex;
	align-items: center;
	gap: 8px;
	border-bottom: 1px solid var(--iwai-border);
	margin-bottom: 8px;
	padding-bottom: 8px;
}

.iwai-composer-title {
	flex: 1;
	border: none;
	outline: none;
	background: transparent;
	font-size: 16px;
	font-weight: 700;
	color: var(--iwai-text);
}
.iwai-composer-title::placeholder { font-weight: 700; color: #b6bfc7; }

/* Info icon + hover/focus tooltip explaining the title. */
.iwai-info {
	position: relative;
	display: inline-flex;
	align-items: center;
	background: none;
	border: none;
	padding: 0;
	color: var(--iwai-muted);
	cursor: help;
	flex: none;
}
.iwai-info:hover, .iwai-info:focus { color: var(--iwai-navy); }
.iwai-info:focus-visible { outline: 2px solid var(--iwai-navy); outline-offset: 2px; border-radius: 3px; }
.iwai-info .iwai-icon { width: 17px; height: 17px; }
.iwai-tooltip {
	position: absolute;
	top: calc(100% + 8px);
	right: 0;
	width: min(240px, calc(100vw - 32px));
	background: #1f2937;
	color: #fff;
	font-size: 12.5px;
	font-weight: 400;
	line-height: 1.45;
	padding: 9px 11px;
	border-radius: 8px;
	box-shadow: 0 4px 14px rgba(9, 54, 91, 0.18);
	opacity: 0;
	visibility: hidden;
	transform: translateY(-3px);
	transition: opacity 0.12s ease, transform 0.12s ease, visibility 0.12s;
	z-index: 20;
}
.iwai-info:hover .iwai-tooltip, .iwai-info:focus .iwai-tooltip {
	opacity: 1;
	visibility: visible;
	transform: translateY(0);
}

.iwai-composer-input {
	width: 100%;
	min-height: 64px;
	border: none;
	font-size: 15px;
	resize: vertical;
	box-sizing: border-box;
	outline: none;
	background: transparent;
	color: var(--iwai-text);
}

.iwai-composer-actions {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-top: 8px;
}

.iwai-composer-link {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	background: none;
	border: none;
	border-radius: 8px;
	color: var(--iwai-muted);
	cursor: pointer;
}
.iwai-composer-link:hover { color: var(--iwai-navy); background: #f6f8fa; }
.iwai-composer-link .iwai-icon { width: 20px; height: 20px; }

.iwai-composer-actions-right { display: flex; align-items: center; gap: 12px; }

/* Formatting-help icon (left of Post): tooltip opens upward. */
.iwai-format-help .iwai-tooltip { top: auto; bottom: calc(100% + 8px); transform: translateY(3px); }
.iwai-format-help:hover .iwai-tooltip,
.iwai-format-help:focus .iwai-tooltip { transform: translateY(0); }
.iwai-tooltip .iwai-fmt-row { display: block; margin-top: 5px; }
.iwai-tooltip code {
	background: rgba(255, 255, 255, 0.16);
	padding: 1px 5px;
	border-radius: 3px;
	font-size: 11.5px;
}

.iwai-composer-submit {
	padding: 8px 20px;
	background: var(--iwai-navy);
	color: #fff;
	border: none;
	border-radius: 20px;
	font-weight: 600;
	cursor: pointer;
}
.iwai-composer-submit:disabled { opacity: 0.6; cursor: default; }
.iwai-composer-error { color: #d63638; margin: 6px 0 0; font-size: 13px; }

.iwai-composer-linkrow { display: flex; gap: 8px; margin-top: 8px; }
.iwai-composer-linkrow[hidden] { display: none; }
.iwai-composer-linkinput {
	flex: 1;
	border: 1px solid var(--iwai-border);
	border-radius: 8px;
	padding: 8px 12px;
	font-size: 14px;
	outline: none;
	color: var(--iwai-text);
}
.iwai-composer-linkadd {
	padding: 8px 14px;
	background: #eef2f5;
	border: none;
	border-radius: 8px;
	font-weight: 600;
	color: var(--iwai-navy);
	cursor: pointer;
}
.iwai-composer-linkpreview { position: relative; margin-top: 10px; }
.iwai-composer-linkpreview:empty { display: none; }
.iwai-linkcard-remove {
	position: absolute;
	top: 8px;
	right: 8px;
	z-index: 2;
	width: 26px;
	height: 26px;
	border: none;
	border-radius: 50%;
	background: rgba(17, 24, 39, 0.72);
	color: #fff;
	font-size: 18px;
	line-height: 1;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
}

/* ---- "The Latest" carousel ---- */

.iwai-latest { margin-bottom: 6px; }

.iwai-latest-head {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 12px;
	margin-bottom: 12px;
	flex-wrap: wrap;
}
.iwai-latest-title {
	margin: 0;
	font-size: 13px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.07em;
	color: var(--iwai-muted);
}
.iwai-latest-links { display: flex; gap: 16px; }
.iwai-latest-links a {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	font-size: 13px;
	font-weight: 600;
	color: var(--iwai-navy);
	text-decoration: none;
}
.iwai-latest-links a:hover { text-decoration: underline; }
.iwai-latest-links .iwai-icon { width: 15px; height: 15px; }

.iwai-latest-viewport { position: relative; }

.iwai-latest-track {
	display: flex;
	gap: 12px;
	overflow-x: auto;
	scroll-snap-type: x mandatory;
	scroll-behavior: smooth;
	/* Generous vertical padding so the hover lift + shadow isn't clipped by the
	   scroll container's overflow (overflow-x:auto also clips the y-axis). */
	padding: 8px 6px 24px;
	scrollbar-width: none;
	-webkit-overflow-scrolling: touch;
}
.iwai-latest-track::-webkit-scrollbar { display: none; }

.iwai-latest-card {
	position: relative;
	flex: 0 0 210px;
	scroll-snap-align: start;
	display: flex;
	flex-direction: column;
	gap: 6px;
	background: #fff;
	border: 1px solid var(--iwai-border);
	border-left: 3px solid var(--iwai-navy);
	border-radius: 10px;
	box-shadow: var(--iwai-shadow);
	padding: 12px 14px;
	text-decoration: none;
	transition: transform 0.1s ease, box-shadow 0.1s ease;
}
.iwai-latest-card:hover { transform: translateY(-2px); box-shadow: 0 6px 16px rgba(9, 54, 91, 0.13); }
.iwai-latest-card--workshop { border-left-color: var(--iwai-green); }
.iwai-latest-card--event { border-left-color: #0e7490; }

.iwai-latest-kind {
	font-size: 11px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	color: var(--iwai-navy);
}
.iwai-latest-card--workshop .iwai-latest-kind { color: var(--iwai-green); }
.iwai-latest-card--event .iwai-latest-kind { color: #0e7490; }
.iwai-latest-cardtitle { font-size: 14.5px; font-weight: 700; line-height: 1.3; color: var(--iwai-text); }
.iwai-latest-excerpt {
	font-size: 12.5px;
	line-height: 1.4;
	color: var(--iwai-body);
	display: -webkit-box;
	-webkit-line-clamp: 3;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.iwai-latest-nav {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	width: 32px;
	height: 32px;
	border-radius: 50%;
	background: #fff;
	border: 1px solid var(--iwai-border);
	box-shadow: 0 2px 8px rgba(9, 54, 91, 0.16);
	color: var(--iwai-navy);
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	z-index: 2;
}
.iwai-latest-nav[hidden] { display: none; }
.iwai-latest-nav:hover { background: #f6f8fa; }
.iwai-latest-nav .iwai-icon { width: 18px; height: 18px; }
.iwai-latest-prev { left: 0; }
.iwai-latest-next { right: 0; }
/* Touch devices swipe the carousel; the arrows only overlap content there. */
@media (hover: none) {
	.iwai-latest-nav { display: none; }
}

/* ---- Sprout divider (borrowed from the EAIF landing page) ---- */

.iwai-sep {
	display: flex;
	align-items: center;
	gap: 18px;
	max-width: 300px;
	margin: 4px auto 22px;
}
.iwai-sep-line { height: 1px; flex: 1 1 auto; }
.iwai-sep-line:first-child { background: linear-gradient(to right, transparent, var(--iwai-border)); }
.iwai-sep-line:last-child { background: linear-gradient(to left, transparent, var(--iwai-border)); }
.iwai-sep .iwai-icon { width: 24px; height: 24px; color: var(--iwai-green); flex: none; }

.iwai-feed-empty { color: var(--iwai-muted); }

/* ---- Avatar (colored rounded square with initial) ---- */

.iwai-avatar {
	position: relative;
	overflow: hidden;
	flex: 0 0 auto;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 38px;
	height: 38px;
	border-radius: 9px;
	color: #fff;
	font-weight: 700;
	font-size: 15px;
	line-height: 1;
	letter-spacing: 0.02em;
}

.iwai-avatar--sm { width: 30px; height: 30px; border-radius: 8px; font-size: 12px; }

/* Gravatar layered over the initials; JS removes it (d=404) when none exists. */
.iwai-avatar-img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	border-radius: inherit;
}

/* ---- Student post (Slack-message style) ---- */

.iwai-post {
	background: #fff;
	border: 1px solid var(--iwai-border);
	border-radius: 12px;
	box-shadow: var(--iwai-shadow);
	padding: 16px 18px;
	margin-bottom: 18px;
}

.iwai-post-head { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }

/* Bookmark (save) toggle, top-right of a post card. */
.iwai-post-controls { margin-left: auto; flex: none; display: inline-flex; align-items: center; gap: 2px; }
.iwai-post-edit,
.iwai-post-delete,
.iwai-bookmark {
	flex: none;
	display: inline-flex;
	align-items: center;
	background: none;
	border: none;
	color: var(--iwai-muted);
	cursor: pointer;
	padding: 4px;
	border-radius: 6px;
}
.iwai-post-edit:hover,
.iwai-bookmark:hover { color: var(--iwai-navy); background: #f6f8fa; }
.iwai-post-delete:hover { color: #d63638; background: #fbeaea; }
.iwai-post-edit .iwai-icon,
.iwai-post-delete .iwai-icon { width: 18px; height: 18px; }
.iwai-bookmark .iwai-icon { width: 20px; height: 20px; }
.iwai-bookmark.is-saved { color: var(--iwai-navy); }
.iwai-bookmark.is-saved .iwai-icon { fill: currentColor; }

/* Inline post editor (author/admin) */
.iwai-edit { display: flex; flex-direction: column; gap: 10px; }
.iwai-edit-title,
.iwai-edit-content {
	width: 100%;
	box-sizing: border-box;
	border: 1px solid var(--iwai-border);
	border-radius: 8px;
	padding: 9px 12px;
	font-size: 15px;
	color: var(--iwai-text);
	outline: none;
}
.iwai-edit-title { font-weight: 700; font-size: 16px; }
.iwai-edit-content { min-height: 120px; resize: vertical; line-height: 1.5; }
.iwai-edit-actions { display: flex; justify-content: flex-end; gap: 8px; }
.iwai-edit-cancel,
.iwai-edit-save {
	padding: 8px 18px;
	border: none;
	border-radius: 20px;
	font-weight: 600;
	cursor: pointer;
}
.iwai-edit-cancel { background: #eef2f5; color: var(--iwai-body); }
.iwai-edit-save { background: var(--iwai-navy); color: #fff; }
.iwai-edit-save:disabled { opacity: 0.6; cursor: default; }
.iwai-edit-error { color: #d63638; margin: 0; font-size: 13px; }
.iwai-post-byline { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.iwai-post-name { font-weight: 700; color: var(--iwai-text); font-size: 15px; }
.iwai-post-time { color: var(--iwai-muted); font-size: 12px; }
a.iwai-post-time { text-decoration: none; }
a.iwai-post-time:hover { text-decoration: underline; }

/* Bookmarks / My Posts / single-post lists match the feed's column width. */
.iwai-postlist { max-width: 640px; margin: 0 auto; }

.iwai-post-title {
	margin: 0 0 6px;
	font-size: 18px;
	font-weight: 700;
	line-height: 1.3;
	color: var(--iwai-text);
}

.iwai-post-body {
	color: var(--iwai-body);
	font-size: 15.5px;
	line-height: 1.55;
}
.iwai-post-body p { margin: 0 0 0.6em; }
.iwai-post-body p:last-child { margin-bottom: 0; }
.iwai-post-body ul { margin: 0.3em 0 0.6em; padding-left: 1.3em; }
.iwai-post-body li { margin: 0.15em 0; }
.iwai-post-body a { color: var(--iwai-navy); text-decoration: underline; word-break: break-word; }

/* Link preview card — on posts and in the composer preview. */
.iwai-linkcard {
	display: flex;
	align-items: stretch;
	margin: 12px 0 0;
	border: 1px solid var(--iwai-border);
	border-radius: 10px;
	overflow: hidden;
	background: #fff;
	text-decoration: none;
	transition: background 0.1s ease;
}
.iwai-linkcard:hover { background: #f6f8fa; }
.iwai-linkcard-img {
	flex: 0 0 104px;
	width: 104px;
	object-fit: cover;
	background-color: #eef2f5;
}
.iwai-linkcard-body {
	min-width: 0;
	padding: 10px 13px;
	display: flex;
	flex-direction: column;
	gap: 3px;
}
.iwai-linkcard-domain { font-size: 11px; text-transform: uppercase; letter-spacing: 0.04em; color: var(--iwai-muted); }
.iwai-linkcard-title {
	font-weight: 700;
	font-size: 14px;
	line-height: 1.3;
	color: var(--iwai-text);
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}
.iwai-linkcard-desc {
	font-size: 12.5px;
	line-height: 1.4;
	color: var(--iwai-body);
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

/* Lucide icons */
.iwai-icon { width: 18px; height: 18px; display: inline-block; vertical-align: -3px; }

/* ---- Reactions (Slack/LinkedIn style) ---- */

.iwai-reactions {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 6px;
	margin: 12px 0 0;
}

.iwai-react-chip {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	padding: 3px 9px;
	border: 1px solid var(--iwai-border);
	border-radius: 14px;
	background: #f6f8fa;
	font-size: 13px;
	line-height: 1.4;
	cursor: pointer;
}

.iwai-react-chip .iwai-react-emoji { font-size: 14px; }
.iwai-react-chip .iwai-react-count { font-weight: 700; color: #5b6b78; }
.iwai-react-chip.is-mine {
	background: #eaf2fb;
	border-color: var(--iwai-navy);
}
.iwai-react-chip.is-mine .iwai-react-count { color: var(--iwai-navy); }

.iwai-react-add { position: relative; display: inline-flex; }

.iwai-react-trigger {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 30px;
	height: 26px;
	border: 1px solid var(--iwai-border);
	border-radius: 14px;
	background: #fff;
	color: #5b6b78;
	cursor: pointer;
}
.iwai-react-trigger:hover { background: #f6f8fa; }

/* Emoji picker popover */
.iwai-react-picker {
	display: none;
	position: absolute;
	bottom: calc(100% + 6px);
	left: 0;
	max-width: calc(100vw - 24px);
	z-index: 20;
	background: #fff;
	border: 1px solid var(--iwai-border);
	border-radius: 22px;
	box-shadow: 0 4px 16px rgba(9, 54, 91, 0.16);
	padding: 4px 6px;
	white-space: nowrap;
}
.iwai-react-add.is-open .iwai-react-picker { display: flex; }

.iwai-react-option {
	border: none;
	background: none;
	font-size: 20px;
	line-height: 1;
	padding: 5px;
	border-radius: 8px;
	cursor: pointer;
	transition: transform 0.08s ease, background 0.08s ease;
}
.iwai-react-option:hover { background: #f0f4f8; transform: scale(1.25); }

/* ---- Inline comments ---- */

.iwai-post-comments { margin-top: 6px; }

/* Light rule separating the reaction row from the comments, only when the
   post actually has comments (or gains its first one live). */
.iwai-post-comments:not(:empty) {
	margin-top: 12px;
	padding-top: 12px;
	border-top: 1px solid var(--iwai-border);
}

/* Older comments collapse behind this toggle on long threads.
   Higher specificity than `.iwai-comment { display: flex }` so it wins
   regardless of source order. */
.iwai-comment.iwai-comment--collapsed { display: none; }
.iwai-comments-more {
	display: inline-block;
	background: none;
	border: none;
	color: var(--iwai-navy);
	font-weight: 600;
	font-size: 13px;
	cursor: pointer;
	padding: 0 0 8px;
}
.iwai-comments-more:hover { text-decoration: underline; }

.iwai-comment { display: flex; gap: 8px; margin: 8px 0; }
.iwai-comment-main { display: flex; flex-direction: column; align-items: flex-start; min-width: 0; }

.iwai-comment-bubble {
	background: #f3f5f7;
	border-radius: 12px;
	padding: 8px 12px;
	font-size: 14px;
}

/* Compact reaction row beneath a comment. */
.iwai-comment .iwai-reactions { margin: 3px 0 0 4px; gap: 5px; }
.iwai-comment .iwai-react-chip { padding: 1px 7px; }
.iwai-comment .iwai-react-chip .iwai-react-emoji { font-size: 12px; }
.iwai-comment .iwai-react-trigger { width: 24px; height: 24px; }
.iwai-comment .iwai-react-trigger .iwai-icon { width: 15px; height: 15px; }

.iwai-comment-meta { display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap; }
.iwai-comment-edit,
.iwai-comment-delete {
	background: none;
	border: none;
	padding: 0;
	margin-left: 2px;
	color: var(--iwai-muted);
	cursor: pointer;
	opacity: 0;
	transition: opacity 0.1s ease, color 0.1s ease;
	align-self: center;
}
.iwai-comment:hover .iwai-comment-edit,
.iwai-comment:hover .iwai-comment-delete,
.iwai-comment-edit:focus,
.iwai-comment-delete:focus { opacity: 1; }
.iwai-comment-edit:hover { color: var(--iwai-navy); }
.iwai-comment-delete:hover { color: #d63638; }
.iwai-comment-edit .iwai-icon,
.iwai-comment-delete .iwai-icon { width: 14px; height: 14px; display: block; }

/* Inline comment editor */
.iwai-comment-edit-box { display: flex; flex-direction: column; gap: 6px; margin-top: 4px; }
.iwai-comment-edit-input {
	width: 100%;
	box-sizing: border-box;
	border: 1px solid var(--iwai-border);
	border-radius: 8px;
	padding: 7px 10px;
	font-size: 14px;
	line-height: 1.45;
	color: var(--iwai-text);
	outline: none;
	resize: vertical;
	min-height: 56px;
}
.iwai-comment-edit-actions { display: flex; justify-content: flex-end; gap: 6px; }
.iwai-comment-edit-cancel,
.iwai-comment-edit-save {
	padding: 5px 14px;
	border: none;
	border-radius: 16px;
	font-size: 13px;
	font-weight: 600;
	cursor: pointer;
}
.iwai-comment-edit-cancel { background: #eef2f5; color: var(--iwai-body); }
.iwai-comment-edit-save { background: var(--iwai-navy); color: #fff; }
.iwai-comment-edit-save:disabled { opacity: 0.6; cursor: default; }
.iwai-comment-name { font-weight: 700; color: var(--iwai-text); font-size: 13px; }
.iwai-comment-time { color: var(--iwai-muted); font-size: 11px; }
.iwai-comment-text { color: var(--iwai-body); }
.iwai-comment-text p { margin: 0; }
.iwai-comment-text p + p { margin-top: 0.5em; }
.iwai-comment-text ul { margin: 0.3em 0; padding-left: 1.2em; }
.iwai-comment-text li { margin: 0.1em 0; }
.iwai-comment-text a { color: var(--iwai-navy); text-decoration: underline; word-break: break-word; }

/* "IWAI Team" verified badge — navy, appended after an admin's name. Kept
   inline (not flex) so the TEXT sits on the same baseline as the name/time;
   the heart is nudged into place with vertical-align rather than dragging the
   whole box's baseline up. */
.iwai-team-badge {
	color: #00538c;
	font-weight: 600;
	font-size: 12px;
	white-space: nowrap;
}
.iwai-team-badge .iwai-icon {
	width: 14px;
	height: 14px;
	margin-right: 3px;
	vertical-align: -0.15em;
}

.iwai-comment-compose { display: flex; gap: 8px; margin-top: 10px; align-items: flex-end; }

.iwai-comment-input {
	flex: 1;
	border: 1px solid var(--iwai-border);
	border-radius: 18px;
	padding: 8px 14px;
	font-size: 14px;
	line-height: 1.45;
	outline: none;
	background: #fff;
	color: var(--iwai-text);
	resize: none;
	max-height: 160px;
}

.iwai-comment-submit {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	background: none;
	border: none;
	color: var(--iwai-navy);
	cursor: pointer;
	padding: 6px 8px;
}

.iwai-comment-submit:disabled { opacity: 0.6; cursor: default; }

/* ---- Briefing / Workshop cards (accent-striped) ---- */

.iwai-cal,
.iwai-content-card {
	position: relative;
	background: #fff;
	border: 1px solid var(--iwai-border);
	border-left-width: 4px;
	border-left-color: var(--iwai-navy);
	border-radius: 10px;
	box-shadow: var(--iwai-shadow);
	padding: 18px 20px;
	margin-bottom: 18px;
}

/* Unread (per-user) briefings/workshops: gold tint + a "New" pill. */
.iwai-new-pill {
	display: inline-block;
	background: var(--iwai-gold);
	color: #fff;
	font-size: 10px;
	font-weight: 700;
	letter-spacing: 0.03em;
	text-transform: uppercase;
	line-height: 1.5;
	padding: 0 7px;
	border-radius: 20px;
	vertical-align: 1px;
}
.iwai-latest-kindrow { display: flex; align-items: center; gap: 6px; }

/* Briefing/workshop permalink toolbar (bookmark + mark unread). */
.iwai-content-actions { display: flex; justify-content: flex-end; align-items: center; gap: 8px; margin-bottom: 14px; }
.iwai-content-unread {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	background: none;
	border: 1px solid var(--iwai-border);
	border-radius: 20px;
	padding: 5px 12px;
	font-size: 13px;
	font-weight: 600;
	color: var(--iwai-body);
	cursor: pointer;
}
.iwai-content-unread:hover { background: #f6f8fa; color: var(--iwai-navy); }
.iwai-content-unread .iwai-icon { width: 16px; height: 16px; }
.iwai-content-unread.is-unread { color: var(--iwai-gold); border-color: rgba(184, 134, 11, 0.45); }
.iwai-latest-card.is-unread { background: rgba(184, 134, 11, 0.11); border-color: rgba(184, 134, 11, 0.30); }
.iwai-cal.is-unread { background: rgba(184, 134, 11, 0.09); }
.iwai-latest-card.is-unread .iwai-latest-cardtitle,
.iwai-cal.is-unread .iwai-cal-title { font-weight: 700; }

.iwai-cal--workshop { border-left-color: var(--iwai-green); }
.iwai-cal--briefing { border-left-color: var(--iwai-navy); }

/* Bookmark toggle, top-right of an archive card (same button as posts). */
.iwai-cal-bookmark { position: absolute; top: 12px; right: 12px; z-index: 1; }
.iwai-cal-meta,
.iwai-cal-title { padding-right: 34px; }

.iwai-cal-meta {
	text-transform: uppercase;
	letter-spacing: 0.04em;
	font-size: 11px;
	font-weight: 700;
	color: var(--iwai-muted);
	margin-bottom: 6px;
}

.iwai-cal-title { margin: 0 0 6px; font-size: 20px; line-height: 1.25; }
.iwai-cal-title a { color: var(--iwai-navy); text-decoration: none; }
.iwai-cal-title a:hover { text-decoration: underline; }
.iwai-cal-desc { color: var(--iwai-body); margin: 0 0 10px; }
.iwai-cal-link { font-size: 13px; font-weight: 600; color: var(--iwai-navy); text-decoration: none; }

.iwai-content-archive { max-width: 640px; margin: 0 auto; }

/* ---- Single community post + content comments (permalink pages) ---- */

.iwai-comments {
	margin-top: 24px;
	border-top: 1px solid var(--iwai-border);
	padding-top: 16px;
}

.iwai-comment-list { list-style: none; margin: 0 0 1.5em; padding: 0; }
.iwai-comment-list .comment { padding: 10px 0; border-bottom: 1px solid #f0f0f0; }

/* ---- Notifications ---- */

.iwai-nav-badge {
	position: absolute;
	top: -9px;
	right: -9px;
	transform: rotate(9deg);
	min-width: 18px;
	padding: 0 5px;
	border-radius: 10px;
	background: #8a6608;
	color: #fff;
	font-size: 11px;
	font-weight: 700;
	line-height: 18px;
	text-align: center;
	border: 2px solid #fff;
	box-shadow: 0 1px 2px rgba(9, 54, 91, 0.2);
}

.iwai-notification { padding: 10px 0; border-bottom: 1px solid var(--iwai-border); }
.iwai-notification.is-unread { font-weight: 600; }
.iwai-notification-date { color: var(--iwai-muted); font-size: 12px; }

/* --- Workshop activity submission --- */
.iwai-activity {
	margin: 28px 0 0;
	padding: 20px;
	background: #fff;
	border: 1px solid var(--iwai-border);
	border-radius: 12px;
	box-shadow: var(--iwai-shadow);
}
.iwai-activity-title { margin: 0 0 4px; font-size: 18px; color: var(--iwai-text); }
.iwai-activity-intro { margin: 0 0 14px; color: var(--iwai-body); font-size: 14px; }

.iwai-activity-form { display: flex; flex-direction: column; gap: 10px; }
.iwai-activity-labelrow { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.iwai-activity-fieldlabel { font-weight: 600; font-size: 13px; color: var(--iwai-text); }
.iwai-activity-labelrow .iwai-format-help { color: var(--iwai-muted); }
.iwai-activity-input {
	width: 100%;
	min-height: 120px;
	padding: 12px 14px;
	border: 1px solid var(--iwai-border);
	border-radius: 8px;
	font: inherit;
	line-height: 1.5;
	color: var(--iwai-text);
	resize: vertical;
	box-sizing: border-box;
}
.iwai-activity-input:focus { outline: 2px solid var(--iwai-navy); outline-offset: 1px; }

/* File dropzone: click anywhere to browse, or drag a file onto it. */
.iwai-activity-dropzone {
	position: relative;
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 16px;
	border: 2px dashed var(--iwai-border);
	border-radius: 10px;
	background: #f9fbfc;
	color: var(--iwai-body);
	cursor: pointer;
	transition: border-color 0.15s ease, background 0.15s ease;
}
.iwai-activity-dropzone:hover { border-color: #b8c6d4; background: #f4f8fb; }
.iwai-activity-dropzone.is-dragover {
	border-color: var(--iwai-navy);
	background: #eef5fb;
}
.iwai-activity-dropzone.has-file { border-style: solid; border-color: var(--iwai-green); background: #f1f9f4; }
.iwai-activity-dropzone .iwai-activity-file {
	position: absolute;
	width: 1px; height: 1px;
	padding: 0; margin: -1px;
	overflow: hidden; clip: rect(0 0 0 0);
	border: 0;
}
.iwai-activity-dropzone-icon {
	display: inline-flex;
	flex: none;
	color: var(--iwai-navy);
}
.iwai-activity-dropzone-icon .iwai-icon { width: 26px; height: 26px; }
.iwai-activity-dropzone.has-file .iwai-activity-dropzone-icon { color: var(--iwai-green); }
.iwai-activity-dropzone-text { display: flex; flex-direction: column; font-size: 14px; line-height: 1.35; }
.iwai-activity-dropzone-text strong { font-weight: 600; color: var(--iwai-text); }
.iwai-activity-browse { color: var(--iwai-navy); text-decoration: underline; }
.iwai-activity-dropzone-hint { margin-top: 2px; font-size: 12px; color: var(--iwai-muted); }
.iwai-activity-dropzone-file { font-size: 14px; font-weight: 600; color: var(--iwai-green); word-break: break-word; }

.iwai-activity-existingfile { margin: 0; font-size: 13px; color: var(--iwai-muted); }
.iwai-activity-privacy { margin: 0; font-size: 12.5px; line-height: 1.45; color: var(--iwai-muted); }
.iwai-activity-actions { display: flex; justify-content: flex-end; }
.iwai-activity-submit {
	padding: 9px 18px;
	background: var(--iwai-navy);
	color: #fff;
	border: 0;
	border-radius: 8px;
	font-weight: 700;
	cursor: pointer;
}
.iwai-activity-submit:disabled { opacity: 0.6; cursor: default; }
.iwai-activity-error { color: #d63638; margin: 0; font-size: 13px; }
.iwai-activity-error[hidden] { display: none; }

.iwai-activity-note {
	margin: 12px 0 0;
	padding: 10px 12px;
	background: #f6f8fa;
	border-radius: 8px;
	font-size: 14px;
	color: var(--iwai-body);
}
.iwai-activity-note--changes { background: #fdf3f3; color: #8a2b2b; }

.iwai-activity-card { border: 1px solid var(--iwai-border); border-radius: 10px; padding: 16px; }
.iwai-activity-cardhead { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.iwai-activity-submitted { font-size: 12.5px; color: var(--iwai-muted); }
.iwai-activity-statusmsg { margin: 12px 0 0; font-size: 14px; color: var(--iwai-body); }
.iwai-activity--pending .iwai-activity-statusmsg { color: var(--iwai-gold); }
.iwai-activity--approved .iwai-activity-statusmsg { color: var(--iwai-green); font-weight: 600; }
.iwai-activity-badge {
	display: inline-block;
	padding: 3px 10px;
	border-radius: 999px;
	font-size: 11px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.03em;
	color: #fff;
	background: var(--iwai-gold);
}
.iwai-activity--approved .iwai-activity-badge { background: var(--iwai-green); }
.iwai-activity--changes_requested .iwai-activity-badge { background: #a33; }
.iwai-activity-content { color: var(--iwai-text); font-size: 15px; line-height: 1.6; }
.iwai-activity-filelink { margin: 12px 0 0; }
.iwai-activity-filelink a { display: inline-flex; align-items: center; gap: 6px; color: var(--iwai-navy); font-weight: 600; }
.iwai-activity-filelink .iwai-icon { width: 16px; height: 16px; }

/* Discussion (reactions + comments) heading on briefing/workshop singles. */
.iwai-discussion-heading {
	margin: 28px 0 12px;
	font-size: 18px;
	color: var(--iwai-text);
}
.iwai-post--discussion { margin-bottom: 0; }
/* No reaction row sits above the thread here, so drop the separator rule and
   keep the comments/compose flush to the card's own (equal) top/bottom padding
   — including when there are no comments yet, just the reply box. */
.iwai-post--discussion .iwai-post-comments { margin-top: 0; }
.iwai-post--discussion .iwai-post-comments:not(:empty) {
	margin: 0 0 12px;
	padding-top: 0;
	border-top: none;
}
.iwai-post--discussion .iwai-post-comments > .iwai-comment:first-child { margin-top: 0; }
.iwai-post--discussion .iwai-comment-compose { margin-top: 0; }

/* --- Activities tab: certification progress + submission history --- */
.iwai-cert {
	padding: 22px 24px;
	border: 1px solid var(--iwai-border);
	border-radius: 14px;
	background: linear-gradient(135deg, #f4f9fc 0%, #eef4fa 100%);
	box-shadow: var(--iwai-shadow);
}
.iwai-cert.is-earned { background: linear-gradient(135deg, #eef9f1 0%, #e4f4ea 100%); border-color: #bfe4cc; }
.iwai-cert-eyebrow {
	display: inline-block;
	font-size: 11px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	color: var(--iwai-navy);
}
.iwai-cert.is-earned .iwai-cert-eyebrow { color: var(--iwai-green); }
.iwai-cert-name { margin: 4px 0 6px; font-size: 22px; line-height: 1.2; color: var(--iwai-text); }
.iwai-cert-intro { margin: 0; color: var(--iwai-body); font-size: 14px; line-height: 1.5; }
.iwai-cert-progress { margin-top: 16px; }
.iwai-cert-bar {
	height: 12px;
	border-radius: 999px;
	background: rgba(0, 83, 140, 0.12);
	overflow: hidden;
}
.iwai-cert-bar span {
	display: block;
	height: 100%;
	border-radius: 999px;
	background: var(--iwai-navy);
	transition: width 0.4s ease;
}
.iwai-cert.is-earned .iwai-cert-bar span { background: var(--iwai-green); }
.iwai-cert-count { margin: 8px 0 0; font-size: 13px; color: var(--iwai-body); }
.iwai-cert-count strong { color: var(--iwai-text); }

.iwai-activities-heading { margin: 26px 0 12px; font-size: 16px; color: var(--iwai-text); }
.iwai-activities-empty { color: var(--iwai-muted); font-size: 14px; }
.iwai-activity-history { list-style: none; margin: 0; padding: 0; }
.iwai-activity-history-item {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 14px 16px;
	border: 1px solid var(--iwai-border);
	border-radius: 10px;
	background: #fff;
	margin-bottom: 8px;
}
.iwai-activity-history-main { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.iwai-activity-history-title { font-weight: 600; font-size: 15px; color: var(--iwai-text); }
.iwai-activity-history-title a { color: var(--iwai-navy); text-decoration: none; }
.iwai-activity-history-title a:hover { text-decoration: underline; }
.iwai-activity-history-date { font-size: 12.5px; color: var(--iwai-muted); }
.iwai-activity-history-item .iwai-activity-badge { flex: none; }

/* --- Billing tab --- */
.iwai-billing-title { margin: 0 0 14px; font-size: 22px; color: var(--iwai-text); }
.iwai-billing-note { color: var(--iwai-body); font-size: 15px; }
.iwai-billing-card {
	padding: 20px;
	border: 1px solid var(--iwai-border);
	border-radius: 12px;
	background: #fff;
	box-shadow: var(--iwai-shadow);
}
.iwai-billing-plan { font-size: 18px; color: var(--iwai-text); }
.iwai-billing-price { color: var(--iwai-body); font-size: 15px; font-weight: 400; }
.iwai-billing-seats { margin-top: 4px; font-size: 13px; color: var(--iwai-muted); }
.iwai-billing-status { margin-top: 14px; font-size: 14px; color: var(--iwai-body); line-height: 1.5; }
.iwai-billing-badge {
	display: inline-block;
	margin-right: 6px;
	padding: 2px 9px;
	border-radius: 999px;
	font-size: 11px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.03em;
	color: #fff;
	background: var(--iwai-muted);
}
.iwai-billing-badge.is-active { background: var(--iwai-green); }
.iwai-billing-badge.is-ending { background: var(--iwai-gold); }
.iwai-billing-badge.is-ended { background: #a33; }

.iwai-billing-cancel { margin-top: 18px; }
.iwai-billing-cancel-open {
	background: none;
	border: 1px solid var(--iwai-border);
	border-radius: 8px;
	padding: 8px 16px;
	font-size: 14px;
	font-weight: 600;
	color: #a33;
	cursor: pointer;
}
.iwai-billing-cancel-open:hover { background: #fdf3f3; border-color: #e3b3b3; }
.iwai-billing-confirm {
	margin-top: 12px;
	padding: 16px;
	border: 1px solid #e3b3b3;
	border-radius: 10px;
	background: #fdf6f6;
}
.iwai-billing-explain { margin: 0 0 12px; font-size: 14px; line-height: 1.5; color: #7a2b2b; }
.iwai-billing-confirm-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.iwai-billing-cancel-go {
	background: #a33;
	color: #fff;
	border: 0;
	border-radius: 8px;
	padding: 9px 18px;
	font-size: 14px;
	font-weight: 700;
	cursor: pointer;
}
.iwai-billing-cancel-go:disabled { opacity: 0.6; cursor: default; }
.iwai-billing-cancel-abort {
	background: none;
	border: 1px solid var(--iwai-border);
	border-radius: 8px;
	padding: 9px 18px;
	font-size: 14px;
	font-weight: 600;
	color: var(--iwai-body);
	cursor: pointer;
}
.iwai-billing-cancel-abort:hover { background: #fff; }
.iwai-billing-error { margin: 10px 0 0; font-size: 13px; color: #d63638; }

/* Seats (invitations) */
.iwai-seats { margin-top: 22px; padding-top: 20px; border-top: 1px solid var(--iwai-border); }
.iwai-seats-title { margin: 0 0 4px; font-size: 16px; color: var(--iwai-text); }
.iwai-seats-hint { margin: 0 0 14px; font-size: 13px; color: var(--iwai-muted); }
.iwai-seat-invite-form { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 6px; }
.iwai-seat-email {
	flex: 1;
	min-width: 200px;
	padding: 9px 12px;
	border: 1px solid var(--iwai-border);
	border-radius: 8px;
	font: inherit;
	color: var(--iwai-text);
}
.iwai-seat-email:focus { outline: 2px solid var(--iwai-navy); outline-offset: 1px; }
.iwai-seat-invite-btn {
	padding: 9px 18px;
	background: var(--iwai-navy);
	color: #fff;
	border: 0;
	border-radius: 8px;
	font-weight: 700;
	cursor: pointer;
}
.iwai-seat-invite-btn:disabled { opacity: 0.6; cursor: default; }
.iwai-seat-error { margin: 6px 0 0; font-size: 13px; color: #d63638; }

.iwai-seat-list { list-style: none; margin: 14px 0 0; padding: 0; }
.iwai-seat-item {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 10px 0;
	border-bottom: 1px solid var(--iwai-border);
}
.iwai-seat-who { flex: 1; min-width: 0; font-size: 14px; color: var(--iwai-text); }
.iwai-seat-email-label { color: var(--iwai-muted); word-break: break-word; }
.iwai-seat-badge {
	flex: none;
	padding: 2px 9px;
	border-radius: 999px;
	font-size: 11px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.03em;
	color: #fff;
}
.iwai-seat-badge.is-active { background: var(--iwai-green); }
.iwai-seat-badge.is-pending { background: var(--iwai-gold); }
.iwai-seat-actions { flex: none; display: flex; gap: 6px; }
.iwai-seat-resend,
.iwai-seat-revoke {
	background: none;
	border: 1px solid var(--iwai-border);
	border-radius: 6px;
	padding: 4px 10px;
	font-size: 12px;
	font-weight: 600;
	color: var(--iwai-body);
	cursor: pointer;
}
.iwai-seat-resend:hover { border-color: var(--iwai-navy); color: var(--iwai-navy); }
.iwai-seat-revoke:hover { border-color: #e3b3b3; color: #a33; background: #fdf3f3; }
.iwai-seat-resend:disabled { opacity: 0.6; cursor: default; }

/* Add a seat (prorated) */
.iwai-seat-add { margin-top: 16px; }
.iwai-seat-add-btn {
	background: none;
	border: 1px dashed var(--iwai-border);
	border-radius: 8px;
	padding: 8px 16px;
	font-size: 13px;
	font-weight: 600;
	color: var(--iwai-navy);
	cursor: pointer;
}
.iwai-seat-add-btn:hover { background: #f6f8fa; border-color: var(--iwai-navy); }
.iwai-seat-add-confirm {
	margin-top: 10px;
	padding: 14px 16px;
	background: #f6f8fa;
	border: 1px solid var(--iwai-border);
	border-radius: 10px;
}
.iwai-seat-add-explain { margin: 0 0 12px; font-size: 14px; color: var(--iwai-body); }
.iwai-seat-add-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.iwai-seat-add-go {
	padding: 8px 16px;
	background: var(--iwai-navy);
	color: #fff;
	border: 0;
	border-radius: 8px;
	font-weight: 700;
	cursor: pointer;
}
.iwai-seat-add-go:disabled { opacity: 0.6; cursor: default; }
.iwai-seat-add-abort {
	padding: 8px 16px;
	background: none;
	border: 1px solid var(--iwai-border);
	border-radius: 8px;
	font-weight: 600;
	color: var(--iwai-body);
	cursor: pointer;
}
.iwai-seat-add-error { margin: 10px 0 0; font-size: 13px; color: #d63638; }

/* Respect reduced-motion: drop the decorative hover/scale transforms + smooth scroll. */
@media (prefers-reduced-motion: reduce) {
	.iwai-latest-card:hover { transform: none; }
	.iwai-react-option:hover { transform: none; }
	.iwai-latest-track { scroll-behavior: auto; }
	.iwai-tooltip { transition: none; }
	.iwai-cert-bar span { transition: none; }
}
