/* Livery OS members' forum.
   Takes the website's own fonts and colours: titles are real headings (so the theme's heading font
   applies), everything is left-aligned whatever the page builder's container says, and the colours,
   text size, button shape, width and style come from Livery OS (Communications, Forum, Look on the website). */

.lof {
	--lof-accent: #1f3a5f;
	--lof-btn: #1f3a5f;
	--lof-btn-ink: #fff;
	--lof-ink: #1d1d1f;
	--lof-muted: #63666d;
	--lof-line: rgba(20, 24, 33, .12);
	--lof-surface: #fff;
	--lof-soft: rgba(20, 24, 33, .035);
	--lof-warn: #8a5300;
	--lof-radius: 14px;
	--lof-btn-radius: 999px;
	--lof-gap: clamp(16px, 2.4vw, 28px);
	--lof-r: 17px; /* The forum's own base size, so a theme or framework that changes the root size (Automatic.css sets it to 10px) does not shrink it. */
	width: 100%;
	margin: 0 auto;
	color: var(--lof-ink);
	text-align: left;
	line-height: 1.6;
	font-size: var(--lof-r);
}
.lof--size-small { --lof-r: 15px; }
.lof--size-large { --lof-r: 19px; }
.lof--w-wide { max-width: 1120px; }
.lof--w-standard { max-width: 860px; }
.lof--btn-rounded { --lof-btn-radius: 8px; }
.lof--btn-square { --lof-btn-radius: 0; --lof-radius: 0; }
.lof *, .lof *::before, .lof *::after { box-sizing: border-box; }
/* Text inside the forum follows the forum's size, not sizes a theme gives to every p, li or a. */
.lof :where(p, li, a, span, label, time, small, strong, em, b, blockquote, button, input, textarea, select, ol, ul) { font-size: inherit; }
.lof :where(p, ul, ol, h2, h3, form) { margin: 0; padding: 0; }
.lof :where(ul, ol) { list-style: none; }
.lof a { color: var(--lof-accent); text-decoration-thickness: 1px; text-underline-offset: 3px; }
.lof :focus-visible { outline: 2px solid var(--lof-accent); outline-offset: 2px; }

/* Headings take the site's heading font unless the body font is chosen. */
.lof .lof-h { font-size: clamp(calc(1.6 * var(--lof-r)), calc(1.2 * var(--lof-r)) + 1.4vw, calc(2.3 * var(--lof-r))); line-height: 1.15; font-weight: 500; color: var(--lof-ink); text-align: left; }
.lof .lof-t { font-size: calc(1.22 * var(--lof-r)); line-height: 1.3; font-weight: 600; text-align: left; letter-spacing: 0; }
.lof .lof-t a { color: var(--lof-ink); text-decoration: none; }
.lof .lof-t a:hover { color: var(--lof-accent); text-decoration: underline; }
.lof--bodyfont .lof-h, .lof--bodyfont .lof-t { font-family: inherit; }
.lof .lof-lead { color: var(--lof-muted); margin-top: 6px; max-width: 62ch; }
.lof .lof-sub { color: var(--lof-muted); font-size: calc(.92 * var(--lof-r)); margin-top: 3px; }

/* Buttons */
.lof .lof-btn {
	display: inline-flex; align-items: center; justify-content: center; gap: 8px;
	min-height: 44px; padding: 10px 24px; border: 1.5px solid var(--lof-btn); border-radius: var(--lof-btn-radius);
	background: var(--lof-btn); color: var(--lof-btn-ink); font: inherit; font-weight: 600; font-size: calc(.95 * var(--lof-r)); line-height: 1.2;
	text-decoration: none; cursor: pointer; white-space: nowrap; transition: filter .15s, background-color .15s;
}
.lof .lof-btn:hover { filter: brightness(.94); color: var(--lof-btn-ink); }
.lof .lof-btn--quiet { background: transparent; color: var(--lof-ink); border-color: var(--lof-line); }
.lof .lof-btn--quiet:hover { background: var(--lof-soft); color: var(--lof-ink); filter: none; }
.lof .lof-act { background: none; border: 0; padding: 0; font: inherit; font-size: calc(.88 * var(--lof-r)); color: var(--lof-muted); text-decoration: underline; text-decoration-color: transparent; text-underline-offset: 3px; cursor: pointer; }
.lof .lof-act:hover { color: var(--lof-accent); text-decoration-color: currentColor; }
.lof .lof-act--small { margin-top: 8px; font-size: calc(.82 * var(--lof-r)); }
.lof .lof-inline { display: inline; }

/* Messages */
.lof .lof-flash { padding: 12px 18px; border-radius: var(--lof-radius); background: #eaf5ec; color: #1c5a2b; margin-bottom: var(--lof-gap); }
.lof .lof-flash.is-err { background: #fbecec; color: #8a1f1f; }
.lof .lof-note { padding: 12px 18px; border-radius: var(--lof-radius); background: var(--lof-soft); margin-bottom: 16px; font-size: calc(.95 * var(--lof-r)); }
.lof .lof-note.is-warn { background: #fff5e6; color: var(--lof-warn); }
.lof .lof-empty { padding: 28px 0; color: var(--lof-muted); }
.lof .lof-tag { display: inline-block; margin-left: 6px; padding: 1px 10px; border-radius: 999px; background: var(--lof-soft); color: var(--lof-muted); font-size: calc(.78 * var(--lof-r)); font-weight: 600; vertical-align: 1px; }
.lof .lof-tag.is-warn { background: #fff0d9; color: var(--lof-warn); }
.lof .lof-sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Page heads, breadcrumbs, search */
.lof .lof-intro { margin-bottom: var(--lof-gap); }
.lof .lof-crumbs { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; font-size: calc(.9 * var(--lof-r)); color: var(--lof-muted); margin-bottom: 14px; }
.lof .lof-crumbs a { color: var(--lof-muted); text-decoration: none; }
.lof .lof-crumbs a:hover { color: var(--lof-accent); text-decoration: underline; }
.lof .lof-crumbs [aria-current] { color: var(--lof-ink); }
.lof .lof-sep { opacity: .45; }
.lof .lof-pagehead { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px 28px; flex-wrap: wrap; padding-bottom: var(--lof-gap); margin-bottom: var(--lof-gap); border-bottom: 1px solid var(--lof-line); }
.lof .lof-toolbar { margin-bottom: 16px; }
.lof .lof-search { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.lof .lof-search input[type="search"] { flex: 1 1 260px; max-width: 460px; min-height: 44px; padding: 10px 20px; border: 1.5px solid var(--lof-line); border-radius: var(--lof-btn-radius); background: var(--lof-surface); color: var(--lof-ink); font: inherit; font-size: calc(.95 * var(--lof-r)); }
.lof .lof-search input[type="search"]:focus { outline: none; border-color: var(--lof-accent); }
.lof .lof-results { margin-bottom: 12px; }

/* Lists of boards and topics: a row per item, title on the left, counts and latest on the right */
.lof .lof-list { border-top: 1px solid var(--lof-line); }
.lof .lof-row { display: grid; grid-template-columns: minmax(0, 1fr) calc(7.5 * var(--lof-r)) minmax(calc(10 * var(--lof-r)), calc(15 * var(--lof-r))); gap: 6px 28px; align-items: start; padding: 20px 4px; border-bottom: 1px solid var(--lof-line); }
.lof .lof-row.is-pinned { background: linear-gradient(90deg, var(--lof-soft), transparent 70%); }
.lof .lof-row-stat { padding-top: 3px; }
.lof .lof-count { color: var(--lof-muted); font-size: calc(.9 * var(--lof-r)); }
.lof .lof-count b { display: block; color: var(--lof-ink); font-size: calc(1.15 * var(--lof-r)); font-weight: 600; line-height: 1.2; }
.lof .lof-row-last { display: flex; flex-direction: column; gap: 1px; font-size: calc(.9 * var(--lof-r)); padding-top: 3px; min-width: 0; }
.lof .lof-row-last a { color: var(--lof-ink); text-decoration: none; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lof .lof-row-last a:hover { color: var(--lof-accent); text-decoration: underline; }
.lof .lof-k { color: var(--lof-muted); font-size: calc(.8 * var(--lof-r)); }
.lof .lof-when { color: var(--lof-muted); }

/* Cards style: the same rows, as separate panels */
.lof--cards .lof-list { border-top: 0; display: grid; gap: 12px; }
.lof--cards .lof-row { background: var(--lof-surface); border: 1px solid var(--lof-line); border-radius: var(--lof-radius); padding: 22px 26px; }
.lof--cards .lof-row.is-pinned { background: var(--lof-surface); border-color: var(--lof-accent); }

/* A topic: the conversation */
.lof .lof-modbar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 18px; padding: 10px 18px; margin-bottom: 18px; border-radius: var(--lof-radius); background: var(--lof-soft); font-size: calc(.9 * var(--lof-r)); }
.lof .lof-modbar > span { font-weight: 600; color: var(--lof-muted); }
.lof .lof-thread { display: grid; gap: 0; }
.lof .lof-post { display: grid; grid-template-columns: 48px minmax(0, 1fr); gap: 18px; padding: 24px 0; border-bottom: 1px solid var(--lof-line); scroll-margin-top: 120px; }
.lof .lof-post:first-child { padding-top: 4px; }
.lof .lof-post.is-hidden { opacity: .6; }
.lof .lof-post:target .lof-post-body { box-shadow: -14px 0 0 -10px var(--lof-accent); }
.lof .lof-avatar { width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; background: color-mix(in srgb, var(--lof-accent) 12%, var(--lof-surface)); color: var(--lof-accent); font-weight: 700; font-size: calc(.95 * var(--lof-r)); letter-spacing: .02em; }
.lof .lof-by { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; margin-bottom: 6px; }
.lof .lof-by b { font-weight: 600; }
.lof .lof-by time { color: var(--lof-muted); font-size: calc(.88 * var(--lof-r)); }
.lof .lof-text { max-width: 72ch; overflow-wrap: anywhere; }
.lof .lof-post.is-first .lof-text { font-size: calc(1.06 * var(--lof-r)); }
.lof .lof-text p { margin: 0 0 .8em; }
.lof .lof-text p:last-child { margin-bottom: 0; }
.lof .lof-acts { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 18px; margin-top: 10px; }
.lof--cards .lof-thread { gap: 12px; }
.lof--cards .lof-post { background: var(--lof-surface); border: 1px solid var(--lof-line); border-radius: var(--lof-radius); padding: 24px; }
.lof--cards .lof-post:first-child { padding-top: 24px; }

/* Writing */
.lof .lof-compose { margin-top: var(--lof-gap); padding: clamp(18px, 2.5vw, 28px); background: var(--lof-surface); border: 1px solid var(--lof-line); border-radius: var(--lof-radius); }
.lof .lof-pagehead + .lof-compose { margin-top: 0; margin-bottom: var(--lof-gap); }
.lof .lof-form { display: grid; gap: 16px; }
.lof .lof-field { display: grid; gap: 6px; font-weight: 600; font-size: calc(.92 * var(--lof-r)); text-align: left; }
.lof .lof-field input, .lof .lof-field textarea { width: 100%; padding: 12px 16px; border: 1.5px solid var(--lof-line); border-radius: 10px; background: var(--lof-surface); color: var(--lof-ink); font: inherit; font-weight: 400; font-size: var(--lof-r); line-height: 1.5; }
.lof--btn-square .lof-field input, .lof--btn-square .lof-field textarea { border-radius: 0; }
.lof .lof-field textarea { resize: vertical; min-height: 130px; }
.lof .lof-field input:focus, .lof .lof-field textarea:focus { outline: none; border-color: var(--lof-accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--lof-accent) 15%, transparent); }
.lof .lof-formbar { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; }

/* Pages */
.lof .lof-pager { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 20px; }
.lof .lof-pager a, .lof .lof-pager span { display: inline-grid; place-items: center; min-width: 40px; height: 40px; padding: 0 12px; border-radius: var(--lof-btn-radius); text-decoration: none; color: var(--lof-ink); border: 1.5px solid var(--lof-line); }
.lof .lof-pager [aria-current] { background: var(--lof-btn); color: var(--lof-btn-ink); border-color: var(--lof-btn); }

/* Logged out, or not a member */
.lof .lof-gate { padding: clamp(24px, 4vw, 44px); border: 1px solid var(--lof-line); border-radius: var(--lof-radius); background: var(--lof-surface); display: grid; gap: 14px; justify-items: start; }
.lof .lof-gate p { color: var(--lof-muted); max-width: 52ch; }

@media (max-width: 760px) {
	.lof { --lof-r: 16px; }
	.lof--size-small { --lof-r: 15px; }
	.lof--size-large { --lof-r: 18px; }
	.lof .lof-row { grid-template-columns: minmax(0, 1fr); gap: 8px; }
	.lof .lof-row-stat { padding-top: 0; }
	.lof .lof-row-last { flex-direction: row; flex-wrap: wrap; gap: 2px 8px; padding-top: 0; }
	.lof .lof-row-last a { white-space: normal; }
	.lof .lof-count b { display: inline; font-size: var(--lof-r); }
	.lof .lof-search input[type="search"] { flex: 1 1 0; min-width: 0; }
	.lof .lof-post { grid-template-columns: 36px minmax(0, 1fr); gap: 12px; }
	.lof .lof-avatar { width: 36px; height: 36px; font-size: calc(.8 * var(--lof-r)); }
	.lof .lof-pagehead { align-items: flex-start; }
}
@media (prefers-reduced-motion: reduce) { .lof * { transition: none !important; } }
