:root {
    /* The palette of the other toastmastersclubs.org pages (FTH4 welcome_shell.html) */
    --navy: #004165;
    --blue: #006094;
    --light: #e6f2f8;
    --border: #b3d4e8;
    --gold: #f2df74;
    --page-bg: #f0f6fa;
    /* Kept for moderation and confidential content, so it stands apart */
    --maroon: #772432;
    --text: #1f2328;
    --muted: #5c6670;
    --line: #d8dde3;
    --frame: #a9b3bf;
    --panel: #eef4f8;
    --bg: #ffffff;
    --soft: #f4f7fa;
    --error: #b42318;
    --ok: #1a7f37;
    --heading-font: Montserrat, "Segoe UI", Arial, sans-serif;
}

* { box-sizing: border-box; }
body { margin: 0; font: 16px/1.5 "Source Sans 3", "Segoe UI", Arial, sans-serif; color: var(--text); background: var(--page-bg); }
a { color: var(--blue); }
h1, h2, h3 { font-family: var(--heading-font); color: var(--navy); }
.wrap { max-width: 1140px; margin: 0 auto; padding: 0 16px; }
.skip-link { position: absolute; left: -10000px; top: 0; background: #fff; color: var(--navy); padding: 8px 12px; z-index: 100; }
.skip-link:focus { left: 8px; top: 8px; }

/* Identity bar, menu bar and banner, as on the welcome pages */
.fth-topbar { background: var(--navy); padding: 0.4rem 0; font-family: var(--heading-font); font-size: 0.75rem; font-weight: 600; letter-spacing: 0.05em; text-transform: uppercase; color: rgba(255, 255, 255, 0.75); text-align: center; }
.fth-navbar { background: var(--blue); }
.fth-navbar .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; }
.fth-navbar nav { display: flex; flex-wrap: wrap; align-items: center; }
.fth-navbar a, .fth-navbar .link-button { display: block; padding: 0.6rem 1.1rem; font-family: var(--heading-font); font-size: 0.82rem; font-weight: 600; text-decoration: none; color: rgba(255, 255, 255, 0.85); white-space: nowrap; transition: background 0.15s; }
.fth-navbar a:hover, .fth-navbar .link-button:hover { background: rgba(255, 255, 255, 0.12); color: #fff; }
.fth-navbar a.active { background: rgba(255, 255, 255, 0.18); color: #fff; }
.account-nav form { margin: 0; }
.link-button { background: none; border: 0; cursor: pointer; }
.fth-navbar .tag.new { background: var(--gold); color: var(--navy); border-color: var(--gold); }
.fth-hero { background: linear-gradient(135deg, #003354 0%, #005a8a 60%, #006fa8 100%); color: #fff; padding: 2.25rem 1rem 1.9rem; text-align: center; }
.fth-hero-title { display: inline-block; font-family: var(--heading-font); font-size: clamp(1.9rem, 5vw, 3rem); font-weight: 700; letter-spacing: -0.01em; line-height: 1.15; color: #fff; text-decoration: none; margin-bottom: 0.5rem; }
.fth-hero-title span { color: var(--gold); }
.fth-tagline { font-size: 1.15rem; color: rgba(255, 255, 255, 0.88); margin: 0; }
.fth-hero.compact { padding: 0.9rem 1rem 0.8rem; }
.fth-hero.compact .fth-hero-title { font-size: 1.5rem; margin-bottom: 0.1rem; }
.fth-hero.compact .fth-tagline { font-size: 0.92rem; }
@media (max-width: 575px) {
    .fth-navbar a, .fth-navbar .link-button { padding: 0.45rem 0.7rem; font-size: 0.78rem; }
}

/* Page content sits in a white panel on the light background, like the welcome page sections */
main.wrap { background: #fff; border: 1px solid var(--border); border-radius: 6px; margin-top: 24px; padding-top: 24px; padding-bottom: 40px; }
@media (max-width: 1172px) { main.wrap { border-radius: 0; border-left: 0; border-right: 0; } }
h1 { font-size: 1.6rem; margin: 0 0 16px; }

.messages { list-style: none; padding: 0; margin: 0 0 16px; }
.messages li { padding: 10px 14px; border-radius: 6px; background: var(--soft); border-left: 4px solid var(--blue); }
.messages li.success { border-left-color: var(--ok); }
.messages li.error { border-left-color: var(--error); }

.form-card { max-width: 440px; }
.field { margin-bottom: 14px; }
.field label { display: block; font-weight: 600; margin-bottom: 4px; }
.field input { width: 100%; padding: 9px 10px; border: 1px solid var(--line); border-radius: 6px; font: inherit; }
.field .help { color: var(--muted); font-size: 0.85rem; margin-top: 4px; }
.field .help ul { margin: 4px 0 0; padding-left: 18px; }
.errorlist { color: var(--error); list-style: none; padding: 0; margin: 4px 0 0; font-size: 0.9rem; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.button { display: inline-block; background: var(--blue); color: #fff; border: 0; border-radius: 6px; padding: 10px 18px; font: inherit; font-weight: 600; cursor: pointer; text-decoration: none; }
.form-links { margin-top: 16px; color: var(--muted); }

/* --- forum --- */
.muted { color: var(--muted); }
.small { font-size: 0.875rem; }
.forum-bar { display: flex; flex-wrap: wrap; gap: 8px 18px; align-items: center; margin-bottom: 16px; }
/* The announcement under the forum bar (Wagtail: Settings → Forum announcement) */
.forum-announcement { display: flex; gap: 14px; align-items: flex-start; margin: -4px 0 20px; padding: 14px 18px; background: var(--gold); color: var(--navy); border: 1px solid #d4bc3c; border-left: 8px solid var(--maroon); border-radius: 8px; box-shadow: 0 2px 8px rgba(0, 65, 101, 0.18); font-size: 1.08rem; font-weight: 600; }
.forum-announcement-icon { flex: none; color: var(--maroon); margin-top: 1px; }
.forum-announcement-body { min-width: 0; }
.forum-announcement-body > :first-child { margin-top: 0; }
.forum-announcement-body > :last-child { margin-bottom: 0; }
.forum-announcement a { color: var(--maroon); }
.forum-search { display: flex; gap: 6px; margin-left: auto; }
.forum-search input { padding: 6px 8px; border: 1px solid var(--line); border-radius: 6px; font: inherit; min-width: 0; width: 220px; max-width: 100%; }
.button.small { padding: 6px 12px; }
.crumbs { font-size: 0.9rem; margin-bottom: 8px; color: var(--muted); }
.forum-section h2 { font-size: 1.15rem; margin: 28px 0 10px; padding-left: 10px; border-left: 4px solid var(--blue); }
.forum-section h2 a { color: var(--text); text-decoration: none; }
.forum-table { width: 100%; border-collapse: separate; border-spacing: 0; margin-bottom: 20px; border: 1px solid var(--border); border-radius: 8px; overflow: hidden; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08); }
.forum-table th { text-align: left; font-size: 0.85rem; color: #fff; background: var(--blue); font-family: var(--heading-font); border-bottom: 1px solid var(--blue); padding: 8px 10px; }
.forum-table td { border-bottom: 1px solid var(--line); padding: 10px; vertical-align: top; }
.forum-table tbody tr:last-child td { border-bottom: 0; }
.forum-table tbody tr:nth-child(even) td { background: #fafbfc; }
.forum-table .num { text-align: right; white-space: nowrap; width: 5em; }
.forum-table .last { width: 13em; font-size: 0.875rem; }
.forum-table tbody tr.sticky td { background: #fdf6f7; }
.cat-name, .topic-subject { font-weight: 600; }
.tag { display: inline-block; font-size: 0.75rem; padding: 1px 6px; border-radius: 4px; background: var(--soft); border: 1px solid var(--line); color: var(--muted); vertical-align: middle; }
.tag.warn { color: var(--error); border-color: var(--error); }
.pagination { display: flex; gap: 16px; align-items: center; margin: 12px 0; }
.post { display: grid; grid-template-columns: 170px 1fr; border: 1px solid var(--frame); border-radius: 8px; margin-bottom: 16px; overflow: hidden; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08); }
.post-first { border-left: 4px solid var(--blue); }
.post-pending, .post-hidden, .post-deleted { border-style: dashed; opacity: 0.8; }
.post-author { font-size: 0.9rem; overflow-wrap: anywhere; background: var(--panel); border-right: 1px solid var(--frame); padding: 14px; }
.author-name { display: block; font-weight: 600; }
.avatar { width: 72px; height: 72px; object-fit: cover; border-radius: 50%; display: block; margin-bottom: 6px; }
.avatar.large { width: 96px; height: 96px; }
.badge { display: inline-block; font-size: 0.72rem; background: var(--blue); color: #fff; border-radius: 4px; padding: 1px 6px; margin: 2px 2px 0 0; }
.post-main { min-width: 0; padding: 0 16px 14px; }
.post-meta { display: flex; gap: 12px; margin: 0 -16px 12px; padding: 8px 16px; background: #f6f8fa; border-bottom: 1px solid var(--line); }
.post-body { overflow-wrap: anywhere; }
.post-body img { max-width: 100%; height: auto; }
.post-body iframe { max-width: 100%; }
.bb-quote { margin: 8px 0; padding: 8px 12px; border-left: 4px solid var(--line); background: var(--soft); }
.bb-quote-by { font-size: 0.85rem; font-weight: 600; margin-bottom: 4px; }
.bb-code { background: #f6f8fa; border: 1px solid var(--line); border-radius: 6px; padding: 10px; overflow-x: auto; font-size: 0.85rem; }
.bb-table { border-collapse: collapse; margin: 8px 0; }
.bb-table td, .bb-table th { border: 1px solid var(--line); padding: 4px 8px; }
.bb-confidential { border: 1px dashed var(--maroon); padding: 8px; margin: 8px 0; }
.bb-confidential-label { font-size: 0.8rem; color: var(--maroon); font-weight: 600; }
.bb-hidden, .bb-missing { color: var(--muted); font-style: italic; }
.bb-warn { border-left: 4px solid var(--error); padding: 6px 10px; margin: 8px 0; }
.bb-attachment { max-width: 100%; }
.attachments { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.attachments img { max-width: 220px; max-height: 160px; border: 1px solid var(--line); border-radius: 4px; }
.signature { border-top: 1px solid var(--line); margin-top: 12px; padding-top: 8px; font-size: 0.85rem; color: var(--muted); }
.signature img { max-height: 90px; }
.poll { border: 1px solid var(--line); border-radius: 8px; padding: 12px; margin-bottom: 14px; }
.poll-bar { background: var(--blue); height: 8px; border-radius: 4px; }
.results li { margin-bottom: 14px; }
.search-section h2 { margin: 24px 0 10px; padding-bottom: 4px; border-bottom: 2px solid var(--border); }
.profile-head { display: flex; gap: 16px; align-items: center; }
@media (max-width: 640px) {
    .post { grid-template-columns: 1fr; }
    .post-author { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: center; border-right: 0; border-bottom: 1px solid var(--frame); padding: 10px 14px; }
    .avatar { width: 40px; height: 40px; margin: 0; }
    .forum-table .last, .forum-table th.last { display: none; }
    .forum-search { margin-left: 0; width: 100%; }
    .forum-search input { flex: 1; }
}


/* --- posting --- */
.title-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; margin-bottom: 8px; }
.title-row h1 { margin: 0; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.actions form { margin: 0; }
.actions.bottom { justify-content: flex-end; }
.button.secondary { background: #fff; color: var(--blue); border: 1px solid var(--blue); }
.button.secondary:hover { background: var(--soft); }
.post-actions { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; margin-top: 12px; }
.post-actions form { margin: 0; }
.thanks { color: var(--muted); margin: 10px 0 0; }
.tag.new { background: var(--maroon); color: #fff; border-color: var(--maroon); }
.post-form { max-width: 860px; }
.post-form .field.check { display: flex; align-items: center; gap: 8px; }
.post-form .field.check input { width: auto; }
.post-form .field.check label { margin: 0; font-weight: normal; }
.post-form textarea { width: 100%; font: inherit; }
.post-form .cancel { margin-left: 12px; }
.quick-reply { margin-top: 28px; border-top: 2px solid var(--line); padding-top: 8px; }

/* --- footer (matches toastmastersclubs.org/welcome/) --- */
body { min-height: 100vh; display: flex; flex-direction: column; }
main.wrap { flex: 1 0 auto; width: 100%; }
.site-footer { background: var(--navy); color: rgba(255, 255, 255, 0.75); font-size: 0.8rem; padding: 1.25rem 0; margin-top: 3rem; text-align: center; }
.site-footer p { margin: 0 0 0.25rem; }
.site-footer .fine-print { font-size: 0.72rem; margin: 0; }
.site-footer a { color: rgba(255, 255, 255, 0.85); }

/* --- moderation --- */
.button.danger { background: var(--error); color: #fff; border: 1px solid var(--error); }
.button.secondary.danger, a.button.danger { color: #fff; }
.mod-tools { border: 1px dashed var(--maroon); border-radius: 8px; padding: 10px 14px; margin: 12px 0 16px; background: #fdf6f7; }
.mod-tools summary { cursor: pointer; font-weight: 600; color: var(--maroon); }
.mod-tools h2 { margin-top: 0; }
.mod-grid { display: flex; flex-wrap: wrap; gap: 10px 14px; margin-top: 10px; align-items: center; }
.mod-grid form { margin: 0; }
.inline-field { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.inline-field input, .inline-field select { padding: 5px 7px; border: 1px solid var(--line); border-radius: 6px; font: inherit; font-size: 0.9rem; max-width: 100%; }
.split-pick { font-size: 0.8rem; color: var(--muted); display: inline-flex; gap: 4px; align-items: center; margin-right: auto; }
.notice { background: #fff4e5; border-left: 4px solid #b54708; padding: 8px 12px; }
.form-card.wide { max-width: 640px; }
.form-card select, .form-card textarea { width: 100%; padding: 9px 10px; border: 1px solid var(--line); border-radius: 6px; font: inherit; }
.field.check { display: flex; gap: 8px; align-items: flex-start; }
.field.check input { width: auto; margin-top: 4px; }
.field.check label { font-weight: normal; }
.ip-line { font-size: 0.8rem; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; color: var(--text); margin-top: 4px; overflow-wrap: anywhere; }
.block-form { margin: 8px 0 14px; }

/* --- private messages --- */
.pm { border: 1px solid var(--frame); border-radius: 8px; padding: 10px 14px; margin: 0 0 12px; max-width: 760px; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06); }
.pm-mine { margin-left: auto; background: #f3f7fa; border-color: #9fb6c7; }
.pm-meta { color: var(--muted); margin-bottom: 4px; }
.account-nav .tag.new { margin-left: 2px; }

/* --- docs, blog, home --- */
.doc { max-width: 900px; }
.doc-updated { margin-top: 32px; border-top: 1px solid var(--line); padding-top: 8px; }
.doc-list { columns: 2 280px; padding-left: 18px; }
.doc-list li { margin-bottom: 6px; break-inside: avoid; }
.docs-search { margin-left: 0; }
/* The docs index written in Wagtail: quick links, then headings, primary links, indented topics */
.doc-index { max-width: 900px; }
.doc-quick { display: flex; flex-wrap: wrap; gap: 10px; margin: 4px 0 24px; }
.doc-quick a { padding: 8px 16px; background: var(--light); border: 1px solid var(--border); border-radius: 6px; font-weight: 600; color: var(--navy); text-decoration: none; }
.doc-quick a:hover, .doc-quick a:focus { background: var(--blue); border-color: var(--blue); color: #fff; }
.doc-index h2 { margin: 28px 0 8px; padding-bottom: 4px; border-bottom: 2px solid var(--border); }
.doc-index h3 { margin: 18px 0 6px; }
.doc-index ul { margin: 0 0 8px; padding-left: 22px; }
.doc-index li { margin: 5px 0; }
.doc-index li > a:first-child { font-weight: 600; }
.doc-index ul ul { margin: 4px 0 8px; padding-left: 26px; list-style: circle; }
.doc-index ul ul li { margin: 3px 0; }
.doc-index ul ul li > a:first-child { font-weight: 400; }
.blog-teaser { border-bottom: 1px solid var(--line); padding: 8px 0 12px; }
.blog-teaser h2 { margin: 8px 0 4px; font-size: 1.25rem; }
.home-links { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; margin-bottom: 24px; }
.home-card { display: flex; flex-direction: column; gap: 4px; border: 1px solid var(--frame); border-radius: 8px; padding: 16px; text-decoration: none; color: var(--text); box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08); border-top: 4px solid var(--blue); }
.home-card strong { font-size: 1.15rem; color: var(--blue); }
.home-card:hover { background: var(--soft); }
.home-grid { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 28px; }
.home-grid aside h2 { font-size: 1.05rem; margin: 0 0 8px; padding-left: 10px; border-left: 4px solid var(--blue); }
.home-list { list-style: none; padding: 0; margin: 0 0 24px; }
.home-list li { margin-bottom: 10px; }
@media (max-width: 760px) { .home-grid { grid-template-columns: 1fr; } }

/* --- member profiles --- */
.profile-head .actions { margin-top: 8px; }
.profile-body { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 24px; margin: 18px 0 24px; }
.profile-facts { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 6px 16px; margin: 0; align-content: start; }
.profile-facts dt { color: var(--muted); }
.profile-facts dd { margin: 0; overflow-wrap: anywhere; }
.profile-text h2 { font-size: 1.05rem; margin: 0 0 6px; }
.profile-text p { margin-top: 0; overflow-wrap: anywhere; }
.profile-text .signature { border-top: 0; margin-top: 0; padding-top: 0; overflow-x: auto; }
.tabs { display: flex; flex-wrap: wrap; gap: 4px; border-bottom: 2px solid var(--line); margin: 8px 0 16px; }
.tabs a { padding: 8px 14px; border-radius: 6px 6px 0 0; font-weight: 600; }
.tabs a.current { background: var(--blue); color: #fff; }
.profile-form { margin-top: 18px; }
.profile-form fieldset { border: 1px solid var(--line); border-radius: 8px; padding: 12px 16px 4px; margin: 0 0 18px; }
.profile-form legend { font-weight: 700; padding: 0 6px; }
.profile-form select, .profile-form textarea { width: 100%; padding: 9px 10px; border: 1px solid var(--line); border-radius: 6px; font: inherit; }
.profile-form input[type=file], .profile-form input[type=checkbox] { width: auto; border: 0; padding: 0; }
.avatar-edit { display: flex; gap: 16px; align-items: flex-start; }
@media (max-width: 760px) { .profile-body { grid-template-columns: minmax(0, 1fr); } }

/* --- private message order --- */
.pm-order { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; max-width: 760px; margin: 0 0 12px; }
.quick-reply.first { margin: 0 0 20px; border-top: 0; padding-top: 0; padding-bottom: 16px; border-bottom: 2px solid var(--line); max-width: 760px; }

/* --- editor emoticon picker --- */
.forum-emoji { display: grid; grid-template-columns: repeat(7, 36px); gap: 2px; padding: 6px; }
.forum-emoji button { font-size: 1.35rem; line-height: 1; width: 36px; height: 36px; border: 0; background: none; border-radius: 6px; cursor: pointer; }
.forum-emoji button:hover, .forum-emoji button:focus { background: var(--soft); }

/* Home page story: each screenshot sits in its own paragraph; set them beside
   the text, alternating sides, instead of alone with empty space beside them. */
.template-homepage .page-body > p:has(img) { margin: 4px 0 12px; }
.template-homepage .page-body > p:has(img) br { display: none; }
.template-homepage .page-body > p:has(img) img { max-width: 100%; height: auto; border: 1px solid var(--border); border-radius: 6px; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08); }
.template-homepage .page-body > p:has(img):nth-child(odd of p:has(img)) { float: left; margin-right: 20px; }
.template-homepage .page-body > p:has(img):nth-child(even of p:has(img)) { float: right; margin-left: 20px; }
.template-homepage .page-body hr, .template-homepage .page-body ul { clear: both; }
@media (max-width: 575px) {
    .template-homepage .page-body > p:has(img) { float: none !important; margin: 4px 0 12px !important; text-align: center; }
}
