/* MESO-Rx — overrides on top of the stock stylesheet. Structure stays XenForo. */

:root {
  --mx-blue: #1d4f7a;
  --mx-blue-dark: #143a5a;
  --mx-red: #b8312f;
  --mx-line: #d7dde3;
  --mx-bg: #eef1f4;
  --mx-card: #ffffff;
  --mx-ink: #1f2b36;
  --mx-dim: #63707c;
  --mx-green: #2f7d4f;
}

html, body {
  background: var(--mx-bg);
  color: var(--mx-ink);
  font-family: 'Roboto','Helvetica Neue',Helvetica,Arial,sans-serif;
  font-size: 15px;
}

a { color: var(--mx-blue); }
a:hover { color: var(--mx-blue-dark); }

.p-header { background: var(--mx-blue); border-bottom: 3px solid var(--mx-red); }
.p-header-inner { display: flex; align-items: center; gap: 18px; max-width: 1200px; margin: 0 auto; padding: 0 12px; height: 52px; }
.p-header-logo { display: flex; align-items: center; gap: 8px; color: #fff; font-weight: 700; font-size: 17px; letter-spacing: .2px; text-decoration: none; }
.p-header-logo img { border-radius: 4px; background: #fff; padding: 2px; }
.p-header-logo:hover { color: #fff; text-decoration: none; }

.p-nav { display: flex; gap: 2px; flex: 1; }
.p-nav a { color: #d7e4ef; padding: 8px 11px; border-radius: 3px; font-size: 13.5px; font-weight: 500; text-decoration: none; }
.p-nav a:hover, .p-nav a[aria-current] { background: rgba(255,255,255,.14); color: #fff; text-decoration: none; }

.p-nav-opposite { display: flex; align-items: center; gap: 8px; }
.p-navEl-splitTrigger { display: none; color: #fff; font-size: 22px; text-decoration: none; }
.auth-slot { display: flex; align-items: center; gap: 8px; }
.auth-slot .button { font-size: 13px; padding: 6px 13px; }
.auth-slot .button--link { color: #d7e4ef; text-decoration: none; }
.auth-slot .button--link:hover { color: #fff; }
.auth-slot .button:not(.button--link) { background: var(--mx-red); color: #fff; border-radius: 3px; text-decoration: none; }
.acc-chip { display: flex; align-items: center; gap: 7px; color: #fff; font-size: 13px; }
.acc-chip b { font-weight: 600; }
.acc-chip .av { width: 26px; height: 26px; border-radius: 3px; background: var(--mx-red); display: grid; place-items: center; font-weight: 700; font-size: 12px; }

.p-sectionLinks { background: var(--mx-blue-dark); }
.p-sectionLinks-inner { display: flex; gap: 2px; max-width: 1200px; margin: 0 auto; padding: 0 12px; }
.p-sectionLinks a { color: #b9cbdb; font-size: 12.5px; padding: 7px 10px; text-decoration: none; }
.p-sectionLinks a:hover { color: #fff; background: rgba(255,255,255,.08); }

.p-body-inner { max-width: 1200px; margin: 0 auto; padding: 0 12px; }
.p-breadcrumbs { display: flex; flex-wrap: wrap; gap: 4px; list-style: none; margin: 12px 0 0; padding: 0; font-size: 12px; color: var(--mx-dim); }
.p-breadcrumbs a { color: var(--mx-dim); text-decoration: none; }
.p-breadcrumbs a:hover { color: var(--mx-blue); }
.p-body-main { padding: 10px 0 30px; }

.block { background: var(--mx-card); border: 1px solid var(--mx-line); border-radius: 4px; margin-bottom: 14px; overflow: hidden; }
.block-header { background: #f4f7f9; border-bottom: 1px solid var(--mx-line); margin: 0; padding: 9px 14px; font-size: 14.5px; font-weight: 600; color: var(--mx-blue-dark); }
.block-header a { color: inherit; text-decoration: none; }
.block-body { padding: 0; }
.block-footer { border-top: 1px solid var(--mx-line); padding: 10px 14px; background: #fafbfc; }

.node { border-bottom: 1px solid #eceff2; }
.node:last-child { border-bottom: 0; }
.node-body { display: flex; gap: 12px; padding: 12px 14px; align-items: flex-start; }
.node-icon { color: var(--mx-blue); font-size: 19px; line-height: 1.3; padding-top: 1px; }
.node-icon svg { width: 19px; height: 19px; fill: currentColor; }
.node-main { flex: 1; min-width: 0; }
.node-title { margin: 0; font-size: 15.5px; font-weight: 600; }
.node-title a { color: var(--mx-blue); text-decoration: none; }
.node-title a:hover { text-decoration: underline; }
.node-description { font-size: 12.5px; color: var(--mx-dim); margin-top: 3px; line-height: 1.5; }
.node-meta { margin-top: 6px; }
.node-stats { display: flex; gap: 16px; padding: 0 14px 12px 45px; font-size: 12px; color: var(--mx-dim); }
.node-stats dl { display: flex; gap: 5px; margin: 0; }
.node-stats dd { margin: 0; font-weight: 600; color: var(--mx-ink); }
.node-last { flex: 0 0 auto; text-align: right; font-size: 12px; color: var(--mx-dim); max-width: 200px; }
.node-last b { display: block; color: var(--mx-blue); font-weight: 500; }

.node--ours { background: linear-gradient(90deg, #f2f8f4 0%, #ffffff 60%); }
.node--ours .node-title a { color: var(--mx-green); }
.ours-badge { display: inline-block; background: var(--mx-green); color: #fff; font-size: 10px; font-weight: 700; letter-spacing: .4px; padding: 1px 6px; border-radius: 2px; margin-left: 6px; vertical-align: 2px; }

.structItem { border-bottom: 1px solid #eceff2; }
.structItem:last-child { border-bottom: 0; }
.structItem-main { display: flex; gap: 12px; padding: 11px 14px; align-items: flex-start; }
.structItem-icon { font-size: 17px; color: var(--mx-blue); padding-top: 2px; }
.structItem-icon svg { width: 17px; height: 17px; fill: currentColor; }
.structItem-cell { flex: 1; min-width: 0; }
.structItem-title { margin: 0; font-size: 14.5px; font-weight: 600; line-height: 1.4; }
.structItem-title a { color: var(--mx-blue); text-decoration: none; }
.structItem-title a:hover { text-decoration: underline; }
.structItem-prefix { background: var(--mx-blue); color: #fff; font-size: 10px; font-weight: 700; padding: 1px 5px; border-radius: 2px; margin-right: 6px; vertical-align: 1px; letter-spacing: .3px; }
.structItem-prefix--ours { background: var(--mx-green); }
.structItem-minor { font-size: 12px; color: var(--mx-dim); margin-top: 4px; display: flex; flex-wrap: wrap; gap: 10px; }
.structItem-extraInfo { display: flex; gap: 14px; font-size: 12px; color: var(--mx-dim); flex: 0 0 auto; }
.structItem-extraInfo dd { margin: 0; font-weight: 600; color: var(--mx-ink); }

.p-title { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; padding: 14px 0 12px; }
.p-title h1 { margin: 0; font-size: 21px; font-weight: 600; line-height: 1.3; color: var(--mx-ink); }
.p-title .p-description { font-size: 13px; color: var(--mx-dim); margin-top: 5px; }
.p-title-pageAction .button { background: var(--mx-red); color: #fff; border-radius: 3px; padding: 8px 15px; font-size: 13.5px; text-decoration: none; white-space: nowrap; }
.p-title-pageAction .button:hover { background: #9c2826; color: #fff; }

.message { border: 1px solid var(--mx-line); border-radius: 4px; background: var(--mx-card); margin-bottom: 12px; overflow: hidden; }
.message-inner { display: flex; }
.message-cell--user { flex: 0 0 150px; background: #f7f9fa; border-right: 1px solid var(--mx-line); padding: 12px; }
.message-cell--main { flex: 1; min-width: 0; padding: 0; }
.message-user { text-align: center; }
.message-avatar { margin-bottom: 8px; }
.message-avatar .avatar { width: 64px; height: 64px; border-radius: 4px; display: grid; place-items: center; font-size: 24px; font-weight: 700; margin: 0 auto; }
.message-name { margin: 0; font-size: 13.5px; font-weight: 600; word-break: break-word; }
.message-name a { color: var(--mx-blue); text-decoration: none; }
.message-userTitle { margin: 3px 0 0; font-size: 11px; font-weight: 500; color: var(--mx-dim); }
.message-vendor .message-userTitle { color: var(--mx-green); }
.message-attribution { display: flex; justify-content: space-between; align-items: center; background: #f7f9fa; border-bottom: 1px solid var(--mx-line); padding: 7px 14px; font-size: 12px; color: var(--mx-dim); }
.message-attribution a { color: var(--mx-dim); text-decoration: none; }
.message-content { padding: 13px 14px; }
.message-body { font-size: 14.5px; line-height: 1.62; overflow-wrap: break-word; }
.message-body p { margin: 0 0 11px; }
.message-body p:last-child { margin-bottom: 0; }
.message-body ul { margin: 0 0 11px; padding-left: 22px; }
.message-body li { margin-bottom: 3px; }
.message-body strong { font-weight: 700; }
.message-footer { border-top: 1px solid #eef1f4; padding: 8px 14px; display: flex; gap: 16px; font-size: 12px; }
.message-footer a { color: var(--mx-dim); text-decoration: none; }
.message-footer a:hover { color: var(--mx-blue); }

.bbWrapper blockquote { margin: 0 0 11px; padding: 9px 12px; background: #f4f7f9; border-left: 3px solid var(--mx-blue); font-size: 13.5px; color: #46525e; }
.bbWrapper blockquote b { color: var(--mx-blue); }

.locked-notice { background: #fdf6e3; border: 1px solid #e8d9a8; border-radius: 4px; padding: 14px 16px; font-size: 13.5px; color: #6b5a1e; display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap; margin-bottom: 14px; }
.locked-notice a { background: var(--mx-red); color: #fff; padding: 7px 14px; border-radius: 3px; font-size: 13px; text-decoration: none; white-space: nowrap; }
.locked-notice a:hover { background: #9c2826; color: #fff; }

.pagination { display: flex; gap: 5px; justify-content: center; padding: 14px 0; font-size: 13px; }
.pagination a, .pagination span { padding: 6px 11px; border: 1px solid var(--mx-line); border-radius: 3px; background: #fff; color: var(--mx-blue); text-decoration: none; }
.pagination span.current { background: var(--mx-blue); color: #fff; border-color: var(--mx-blue); }

.block-outer { margin-bottom: 16px; }
.block--messages .block-body { padding: 0; }

.p-footer { background: var(--mx-blue-dark); color: #9fb4c6; margin-top: 30px; font-size: 12.5px; }
.p-footer-inner { max-width: 1200px; margin: 0 auto; padding: 20px 12px; }
.p-footer-row { display: flex; flex-wrap: wrap; gap: 16px; margin-bottom: 10px; }
.p-footer a { color: #c6d6e2; text-decoration: none; }
.p-footer a:hover { color: #fff; }

.authpage { max-width: 430px; margin: 30px auto 60px; }
.authpage .block { padding: 0; }
.authpage .block-body { padding: 22px; }
.authpage h1 { font-size: 20px; margin: 0 0 5px; }
.authpage .sub { color: var(--mx-dim); font-size: 13px; margin: 0 0 18px; }
.field { margin-bottom: 13px; }
.field label { display: block; font-size: 12.5px; font-weight: 600; margin-bottom: 5px; color: var(--mx-ink); }
.field input[type=text], .field input[type=email], .field input[type=password] { width: 100%; box-sizing: border-box; padding: 9px 11px; border: 1px solid #c3ccd4; border-radius: 3px; font-size: 14px; font-family: inherit; }
.field input:focus { outline: 0; border-color: var(--mx-blue); box-shadow: 0 0 0 2px rgba(29,79,122,.15); }
.field-row { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--mx-dim); margin-bottom: 15px; }
.authpage .button { width: 100%; padding: 11px; background: var(--mx-red); color: #fff; border: 0; border-radius: 3px; font-size: 14.5px; font-weight: 600; cursor: pointer; font-family: inherit; }
.authpage .button:hover { background: #9c2826; }
.authpage .button[disabled] { opacity: .7; cursor: default; }
.auth-foot { text-align: center; font-size: 12.5px; color: var(--mx-dim); margin-top: 15px; }
.auth-foot a { color: var(--mx-blue); }

.pending { text-align: center; padding: 34px 20px; }
.pending .ring { width: 46px; height: 46px; border: 3px solid #dbe3ea; border-top-color: var(--mx-red); border-radius: 50%; margin: 0 auto 16px; animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.pending h1 { font-size: 19px; margin: 0 0 6px; }
.pending p { color: var(--mx-dim); font-size: 13.5px; margin: 0 auto 4px; max-width: 340px; line-height: 1.6; }
.pending .dots::after { content: ''; animation: dots 1.4s steps(4,end) infinite; }
@keyframes dots { 0% { content: ''; } 25% { content: '.'; } 50% { content: '..'; } 75% { content: '...'; } }
.pending .stamp { display: inline-block; margin-top: 18px; background: #fdf6e3; border: 1px solid #e8d9a8; color: #6b5a1e; font-size: 12px; padding: 6px 12px; border-radius: 3px; }
.pending .small { font-size: 12px; margin-top: 16px; color: #8a949e; }

.pairs { display: flex; gap: 16px; flex-wrap: wrap; font-size: 12.5px; color: var(--mx-dim); padding: 12px 14px; border-top: 1px solid var(--mx-line); background: #fafbfc; }
.pairs b { color: var(--mx-ink); }

.forumstats { display: flex; gap: 26px; flex-wrap: wrap; font-size: 12.5px; color: var(--mx-dim); padding: 13px 14px; }
.forumstats dl { margin: 0; }
.forumstats dt { font-size: 11px; text-transform: uppercase; letter-spacing: .4px; }
.forumstats dd { margin: 2px 0 0; font-size: 15px; font-weight: 600; color: var(--mx-ink); }

.modal[hidden] { display: none; }
.modal { position: fixed; inset: 0; z-index: 60; display: flex; align-items: flex-start; justify-content: center; padding: 50px 14px; overflow-y: auto; }
.modal-mask { position: fixed; inset: 0; background: rgba(20,30,40,.55); }
.modal-inner { position: relative; background: #fff; border-radius: 4px; width: 100%; max-width: 430px; box-shadow: 0 12px 40px rgba(0,0,0,.3); }
.modal-header { display: flex; justify-content: space-between; align-items: center; padding: 13px 16px; border-bottom: 1px solid var(--mx-line); }
.modal-header h2 { margin: 0; font-size: 16px; }
.modal-close { font-size: 22px; line-height: 1; text-decoration: none; color: var(--mx-dim); }
.modal-content { padding: 18px 16px; }

@media (max-width: 820px) {
  .p-nav { display: none; }
  .p-nav.open { display: flex; position: absolute; top: 52px; left: 0; right: 0; background: var(--mx-blue); flex-direction: column; padding: 8px; z-index: 50; box-shadow: 0 8px 20px rgba(0,0,0,.25); }
  .p-nav.open a { padding: 11px 12px; }
  .p-navEl-splitTrigger { display: block; }
  .p-header-inner { position: relative; }
  .auth-slot .button--link { display: none; }
  .message-cell--user { flex-basis: 100%; border-right: 0; border-bottom: 1px solid var(--mx-line); display: flex; align-items: center; gap: 10px; text-align: left; padding: 9px 12px; }
  .message-inner { flex-direction: column; }
  .message-avatar { margin: 0; }
  .message-avatar .avatar { width: 34px; height: 34px; font-size: 14px; }
  .node-stats { padding-left: 14px; }
  .node-last { display: none; }
  .structItem-extraInfo { display: none; }
  .p-title { flex-direction: column; }
}

@media (prefers-color-scheme: dark) {
  html, body { background: #12181e; color: #d4dbe2; }
  .block, .message { background: #1a222b; border-color: #2b3540; }
  .block-header, .message-attribution, .pairs, .message-cell--user, .block-footer { background: #161d25; border-color: #2b3540; }
  .block-header { color: #a9c3da; }
  .message-body, .p-title h1, .forumstats dd, .structItem-extraInfo dd, .node-stats dd { color: #d4dbe2; }
  .node, .structItem { border-color: #232c36; }
  .bbWrapper blockquote { background: #161d25; color: #aab6c2; }
  .node--ours { background: linear-gradient(90deg, #17251c 0%, #1a222b 60%); }
  .field input { background: #12181e; color: #d4dbe2; border-color: #33404c; }
  .modal-inner { background: #1a222b; }
  .site-banner { background: #1a222b; color: #d4dbe2; border-color: #2b3540; }
}

.site-banner { background: #fff7e0; border-bottom: 1px solid #e8d9a8; color: #6b5a1e; font-size: 12.5px; text-align: center; padding: 8px 12px; }
.site-banner a { color: inherit; font-weight: 600; }
.site-banner button { background: none; border: 0; color: inherit; cursor: pointer; font-size: 15px; margin-left: 8px; }
