/* IronTheory Forum — minimal, uses theme tokens (--ink, --paper, --red, fonts). */
.iwf-wrap { padding-bottom: 64px; }
.iwf-title { font-size: clamp(1.8rem, 4.4vw, 2.8rem); overflow-wrap: anywhere; }
.iwf-h { font: 700 .95rem/1.2 var(--f-ui); letter-spacing: .12em; text-transform: uppercase; color: var(--ash); margin: 40px 0 14px; }
.iwf-note { color: var(--ash); font: 500 .95rem/1.4 var(--f-ui); }
.iwf-note a { color: var(--paper); }
.iwf-empty { color: var(--ash); padding: 16px 0; margin: 0; }
.iwf-muted-link { font: 500 .95rem var(--f-ui); color: var(--ash); margin-left: 10px; }

/* flash */
.iwf-flash { border-left: 3px solid var(--paper); background: var(--ink-2); padding: 10px 14px; margin: 0 0 20px; font: 600 1rem/1.4 var(--f-ui); }
.iwf-flash--err { border-color: var(--red); }

/* boxes + forms */
.iwf-box { background: var(--ink-2); border: 1px solid var(--line); border-radius: 8px; padding: clamp(18px, 3vw, 26px); margin-bottom: 20px; }
.iwf-box h2 { font-size: 1.5rem; }
.iwf-form label { display: block; font: 600 .85rem/1.2 var(--f-ui); letter-spacing: .08em; text-transform: uppercase; color: var(--ash); margin-bottom: 6px; }
.iwf-form input[type=text], .iwf-form input[type=email], .iwf-form input[type=password], .iwf-form select, .iwf-form textarea {
	width: 100%; background: var(--ink); color: var(--paper); border: 1px solid var(--line); border-radius: 6px;
	padding: 11px 13px; font: 400 1rem/1.5 var(--f-body);
}
.iwf-form textarea { resize: vertical; min-height: 90px; }
.iwf-form input:focus, .iwf-form select:focus, .iwf-form textarea:focus { outline: none; border-color: var(--red-hot); }
.iwf-form small { display: block; color: var(--ash); font: 400 .85rem var(--f-ui); margin-top: 4px; }
.iwf-form p { margin: 0 0 16px; }
.iwf-check label { text-transform: none; letter-spacing: 0; font-weight: 500; font-size: 1rem; color: var(--paper); display: flex; gap: 8px; align-items: flex-start; }
.iwf-check input { margin-top: 4px; accent-color: var(--red); }
.iwf-auth { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; align-items: start; }

/* index hero */
.iwf-hero { display: flex; flex-wrap: wrap; gap: 14px 24px; align-items: center; justify-content: space-between; padding: 0 0 20px; border-bottom: 1px solid var(--line); }
.iwf-hero__lede { flex: 1 1 100%; font-size: 1.1rem; color: var(--paper-2); margin: 0; }
.iwf-hero__stats, .iwf-topic__stats, .iwf-row__stats { display: flex; flex-wrap: wrap; gap: 6px 18px; align-items: center; }
.iwf-stat { font: 500 .92rem var(--f-ui); color: var(--ash); white-space: nowrap; }
.iwf-stat b { color: var(--paper); font-weight: 700; }

/* sections */
.iwf-sections { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.iwf-section { display: flex; flex-direction: column; gap: 4px; padding: 16px 18px; text-decoration: none; background: var(--ink); transition: background .15s; }
.iwf-section:hover { background: var(--ink-2); }
.iwf-section__name { font: 700 1.2rem/1.2 var(--f-ui); text-transform: uppercase; letter-spacing: .03em; }
.iwf-section:hover .iwf-section__name { color: var(--red-hot); }
.iwf-section__name em { font: 600 .72rem var(--f-ui); font-style: normal; color: var(--ash); border: 1px solid var(--line); border-radius: 4px; padding: 1px 5px; vertical-align: middle; }
.iwf-section__desc { color: var(--ash); font-size: .95rem; line-height: 1.45; }
.iwf-section__stats { font: 600 .85rem var(--f-ui); color: var(--paper-2); margin-top: 6px; }
.iwf-section__last { font: 400 .88rem var(--f-ui); color: var(--ash); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* topic rows */
.iwf-list { border-top: 1px solid var(--line); }
.iwf-row { display: grid; grid-template-columns: auto 1fr auto; gap: 14px; align-items: center; padding: 14px 4px; border-bottom: 1px solid var(--line); }
.iwf-row:hover { background: rgba(241, 235, 224, .025); }
.iwf-row__title { font: 600 1.12rem/1.3 var(--f-ui); text-transform: none; letter-spacing: 0; margin: 0 0 3px; }
.iwf-row__title a { text-decoration: none; }
.iwf-row__title a:hover { color: var(--red-hot); }
.iwf-row__meta { margin: 0; color: var(--ash); font: 400 .9rem var(--f-ui); }
.iwf-row__meta a { color: var(--paper-2); text-decoration: none; }
.iwf-row__main { min-width: 0; }
.iwf-row__stats .iwf-stat { min-width: 64px; text-align: right; }
.iwf-flag { display: inline-block; font: 600 .72rem var(--f-ui); text-transform: uppercase; color: var(--ash); border: 1px solid var(--line); padding: 1px 6px; margin-right: 6px; border-radius: 4px; vertical-align: middle; }
.iwf-toolbar { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; margin-bottom: 16px; }

/* avatar */
.iwf-avatar { --s: 40px; display: inline-grid; place-items: center; flex: none; width: var(--s); height: var(--s); border-radius: 50%; background: hsl(calc(var(--h) * 1deg + 350deg), 22%, 26%); color: var(--paper); font: 700 calc(var(--s) * .42)/1 var(--f-ui); vertical-align: middle; }
.menu-item-account .iwf-avatar { margin-right: 4px; }

/* rules */
.iwf-rules { border-left: 3px solid var(--red); background: var(--ink-2); padding: 12px 16px; margin-bottom: 20px; border-radius: 0 6px 6px 0; }
.iwf-rules strong { font: 700 .85rem var(--f-ui); text-transform: uppercase; letter-spacing: .1em; color: var(--red-hot); }
.iwf-rules p { margin: 4px 0 0; font-size: .95rem; color: var(--paper-2); }

/* topic */
.iwf-topic { padding: 0 0 18px; border-bottom: 1px solid var(--line); }
.iwf-topic__head { display: flex; gap: 12px; align-items: center; margin-bottom: 14px; }
.iwf-topic__head strong { display: block; font: 700 1.05rem var(--f-ui); }
.iwf-topic__body { font-size: 1.08rem; overflow-wrap: anywhere; }
.iwf-topic__body a, .iwf-reply__text a { color: var(--red-hot); }
.iwf-topic__stats { margin-top: 14px; }
.iwf-topic__actions { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; margin-top: 10px; }
.iwf-topic__actions:empty { display: none; }

/* likes + small actions */
.iwf-like { display: inline-flex; align-items: center; gap: 6px; background: transparent; color: var(--ash); border: 1px solid var(--line); border-radius: 999px; padding: 3px 11px; font: 600 .9rem var(--f-ui); cursor: pointer; transition: color .15s, border-color .15s; }
.iwf-like:hover { color: var(--paper); border-color: var(--ash); }
.iwf-like.is-liked { color: var(--paper); border-color: var(--red); background: rgba(155, 45, 38, .25); }
.iwf-like.is-liked .iwf-like__icon { color: var(--red-hot); }
.iwf-act { background: none; border: 0; padding: 0; color: var(--ash); font: 600 .82rem var(--f-ui); text-transform: uppercase; letter-spacing: .06em; cursor: pointer; text-decoration: none; }
.iwf-act:hover { color: var(--paper); }
.iwf-act--danger:hover { color: var(--red-hot); }
.iwf-mod { display: inline-block; position: relative; }
.iwf-mod summary { list-style: none; cursor: pointer; font: 600 .78rem var(--f-ui); text-transform: uppercase; letter-spacing: .06em; color: var(--ash); border: 1px solid var(--line); padding: 1px 8px; border-radius: 4px; }
.iwf-mod summary::-webkit-details-marker { display: none; }
.iwf-mod__body { position: absolute; z-index: 20; top: 130%; left: 0; display: grid; gap: 8px; min-width: 200px; background: var(--ink-2); border: 1px solid var(--line); padding: 12px; border-radius: 6px; box-shadow: 0 10px 24px rgba(0, 0, 0, .45); }

/* replies */
.iwf-thread { margin-top: 8px; }
.iwf-replies { list-style: none; margin: 0 0 24px; padding: 0; }
.iwf-replies--child { margin: 0 0 0 clamp(14px, 4vw, 30px); padding-left: clamp(10px, 2vw, 16px); border-left: 1px solid var(--line); }
.iwf-reply { scroll-margin-top: 90px; }
.iwf-reply__card { padding: 14px 0; border-bottom: 1px solid var(--line); }
.iwf-replies--child .iwf-reply__card { padding-top: 12px; }
.iwf-reply:target > .iwf-reply__card { background: rgba(155, 45, 38, .12); }
.iwf-reply__head { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; font-family: var(--f-ui); }
.iwf-reply__head strong { font-weight: 700; }
.iwf-reply__time { margin-left: auto; color: var(--ash); font-size: .85rem; text-decoration: none; }
.iwf-op { font: 700 .68rem var(--f-ui); letter-spacing: .08em; color: var(--paper); background: var(--red); padding: 1px 5px; border-radius: 3px; }
.iwf-reply__text { margin: 6px 0 8px; overflow-wrap: anywhere; }
.iwf-reply__text p { margin: 0 0 .5em; }
.iwf-reply__foot { display: flex; gap: 14px; flex-wrap: wrap; align-items: center; }
.iwf-replying-to { font: 500 1rem var(--f-ui); }
.iwf-reply-form.is-nested { margin: 12px 0; }

/* account */
.iwf-account__head { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; margin-bottom: 22px; }
.iwf-account__name { margin: 0; font-size: 1.8rem; }
.iwf-account__head p { margin: 4px 0 0; }
.iwf-account__btns { margin-left: auto; display: flex; gap: 10px; flex-wrap: wrap; }
.iwf-kpis { display: grid; grid-template-columns: repeat(5, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 8px; overflow: hidden; margin-bottom: 22px; }
.iwf-kpis div { background: var(--ink); padding: 14px 12px; }
.iwf-kpis b { display: block; font: 700 1.6rem/1 var(--f-ui); color: var(--paper); }
.iwf-kpis span { font: 600 .78rem var(--f-ui); text-transform: uppercase; letter-spacing: .06em; color: var(--ash); }
.iwf-tabs { display: flex; gap: 4px; flex-wrap: wrap; border-bottom: 1px solid var(--line); margin-bottom: 18px; }
.iwf-tabs a { padding: 8px 12px; font: 600 .95rem var(--f-ui); text-transform: uppercase; letter-spacing: .05em; text-decoration: none; color: var(--ash); border-bottom: 2px solid transparent; margin-bottom: -1px; }
.iwf-tabs a:hover { color: var(--paper); }
.iwf-tabs a[aria-current] { color: var(--paper); border-color: var(--red); }
.iwf-table-wrap { overflow-x: auto; }
.iwf-table { width: 100%; border-collapse: collapse; font-family: var(--f-ui); }
.iwf-table th { text-align: left; font-weight: 600; text-transform: uppercase; font-size: .78rem; letter-spacing: .06em; color: var(--ash); padding: 8px 10px; border-bottom: 1px solid var(--line); }
.iwf-table td { padding: 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
.iwf-table td small { display: block; color: var(--ash); }
.iwf-table td a { text-decoration: none; font-weight: 600; }
.iwf-feed { border-top: 1px solid var(--line); }
.iwf-feed__item { padding: 14px 0; border-bottom: 1px solid var(--line); }
.iwf-feed__item header { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; font-family: var(--f-ui); }
.iwf-feed__text { margin: 6px 0; }
.iwf-feed__text p { margin: 0 0 .5em; }
.iwf-quick form { display: grid; gap: 8px; margin-top: 8px; }
.iwf-quick form button { justify-self: start; }
.iwf-quick summary { list-style: none; }
.iwf-quick summary::-webkit-details-marker { display: none; }

@media (max-width: 760px) {
	.iwf-auth { grid-template-columns: 1fr; }
	.iwf-row { grid-template-columns: auto 1fr; }
	.iwf-row__stats { grid-column: 2; }
	.iwf-row__stats .iwf-stat { min-width: 0; text-align: left; }
	.iwf-kpis { grid-template-columns: repeat(3, 1fr); }
	.iwf-account__btns { margin-left: 0; }
	.iwf-table thead { display: none; }
	.iwf-table, .iwf-table tbody, .iwf-table tr, .iwf-table td { display: block; width: 100%; }
	.iwf-table tr { border-bottom: 1px solid var(--line); padding: 8px 0; }
	.iwf-table td { border: 0; padding: 3px 0; }
	.iwf-table td[data-l]:not([data-l="Topic"])::before { content: attr(data-l) ": "; color: var(--ash); font-size: .8rem; text-transform: uppercase; }
	.iwf-table td[data-l="Replies"], .iwf-table td[data-l="Views"], .iwf-table td[data-l="Likes"], .iwf-table td[data-l="People"] { display: inline-block; width: auto; margin-right: 12px; }
	.iwf-mod__body { left: auto; right: 0; }
}
@media (max-width: 420px) {
	.iwf-kpis { grid-template-columns: repeat(2, 1fr); }
}

/* photos */
img.iwf-avatar--img { object-fit: cover; padding: 0; background: var(--ink-3); }
.iwf-avatar-edit { display: flex; gap: 16px; align-items: center; margin-bottom: 18px; }
.iwf-avatar-edit input[type=file] { color: var(--ash); font: 500 .9rem var(--f-ui); max-width: 100%; }
.iwf-gallery { display: grid; gap: 6px; margin: 14px 0 4px; grid-template-columns: repeat(3, 1fr); max-width: 640px; }
.iwf-gallery--1 { grid-template-columns: 1fr; max-width: 520px; }
.iwf-gallery--2 { grid-template-columns: 1fr 1fr; }
.iwf-gallery__item { display: block; position: relative; aspect-ratio: 1 / 1; overflow: hidden; border-radius: 6px; background: var(--ink-3); }
.iwf-gallery--1 .iwf-gallery__item { aspect-ratio: auto; }
.iwf-gallery__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: opacity .15s; }
.iwf-gallery--1 .iwf-gallery__img { position: static; height: auto; max-height: 520px; object-fit: contain; }
.iwf-gallery__item:hover .iwf-gallery__img { opacity: .85; }
.iwf-upload { margin: 0 0 16px; }
.iwf-upload__btn { display: inline-flex !important; align-items: center; gap: 6px; cursor: pointer; border: 1px dashed var(--line); border-radius: 6px; padding: 8px 14px; color: var(--paper) !important; letter-spacing: .04em !important; }
.iwf-upload__btn:hover { border-color: var(--ash); }
.iwf-upload__input:not(.iwf-upload__input--single) { position: absolute; width: 1px; height: 1px; opacity: 0; }
.iwf-upload__preview { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.iwf-upload__preview img { width: 64px; height: 64px; object-fit: cover; border-radius: 4px; }
.iwf-upload__err { color: var(--red-hot); font: 600 .9rem var(--f-ui); width: 100%; }
