/* CactiExchange theme — base, layout and the colour field.
   Rule of the design: every piece of text sits on SOLID black or SOLID white, so contrast is
   21:1 whatever colour is passing behind it. Colour lives only in the background. */

:root {
  --cx-ink: #0b0b0b;
  --cx-paper: #ffffff;
  --cx-ring: 3px;
  --cx-radius: 16px;
  --cx-font: ui-rounded, "SF Pro Rounded", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --cx-dusk: linear-gradient(160deg, #3a1c71 0%, #b24592 30%, #f15f79 55%, #ffaf7b 80%, #ffd27a 100%);
  --cx-bloom: linear-gradient(200deg, #ff4f9a 0%, #ff7a59 32%, #ffc93c 62%, #f9a8d4 82%, #c86bfa 100%);
  --cx-succulent: linear-gradient(135deg, #0f766e 0%, #2f9e6b 30%, #9bcf63 60%, #d9ed92 80%, #5ed3c3 100%);
}

html { font-size: 100%; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  padding: 0 0 28px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: var(--cx-font);
  font-size: 1rem;
  line-height: 1.5;
  color: var(--cx-ink);
  background: #b24592; /* shown for an instant before the colour field paints */
  position: relative;
  overflow-x: hidden;
}

/* ---- Colour field: three fixed layers, cross-faded with opacity and drifted with transform
        (both run on the compositor; nothing repaints). ---- */
.background-container {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
  background: #b24592;
}
.parallax-background {
  position: absolute;
  inset: -30%;
  will-change: transform;
}
.parallax-background > div { display: none; }
.parallax-background > .object1,
.parallax-background > .object2,
.parallax-background > .object3 {
  display: block;
  position: absolute;
  inset: 0;
}
.parallax-background > .object1 { background: var(--cx-dusk); }
.parallax-background > .object2 { background: var(--cx-bloom); opacity: 0; will-change: opacity; }
.parallax-background > .object3 { background: var(--cx-succulent); opacity: 0; will-change: opacity; }

/* ---- Layout ---- */
.container {
  position: relative;
  width: 100%;
  max-width: 560px;
  margin: 0 auto;
  padding: 0 16px;
  box-sizing: border-box;
  text-align: center;
  word-break: break-word;
}
.container .container { padding: 0; }
.row, .column { width: 100%; box-sizing: border-box; }
.column { margin-top: 12px !important; }

/* ---- Typography: the name is a black slab, the bio a white card ---- */
h1 {
  display: block;
  width: fit-content;
  margin: 18px auto 14px;
  padding: 8px 18px;
  max-width: 100%;
  box-sizing: border-box;
  background: var(--cx-ink);
  color: var(--cx-paper);
  border: var(--cx-ring) solid var(--cx-paper);
  border-radius: var(--cx-radius);
  font-size: clamp(1.45rem, 6.4vw, 2.1rem);
  line-height: 1.2;
  font-weight: 800;
  letter-spacing: -0.01em;
}
h1 svg, h1 .badge { vertical-align: -0.05em; margin-left: .25em; }

.description-parent {
  display: block;
  margin: 0 6px 22px;
  padding: 14px 16px !important;
  background: var(--cx-paper);
  color: var(--cx-ink);
  border: var(--cx-ring) solid var(--cx-ink);
  border-radius: var(--cx-radius);
  box-shadow: 5px 5px 0 var(--cx-ink);
  font-size: 1rem;
  text-align: center;
}
.description-parent * { margin-top: 0; margin-bottom: .7em; }
.description-parent > p:last-child, .description-parent p > :last-child { margin-bottom: 0; }
/* LinkStack wraps the bio in a <p>; a bio that is itself HTML leaves that wrapper empty, and a
   missing bio leaves it as the only child. Hide the empty wrapper, and the whole card when there is no bio. */
.description-parent p:empty { display: none; }
.description-parent:has(> p:only-child:empty) { display: none; }
.description-parent h2, .description-parent h3, .description-parent h4 { font-size: 1.1rem; line-height: 1.3; font-weight: 800; }
.description-parent ul, .description-parent ol { text-align: left; padding-left: 1.2rem; }
.description-parent a { color: var(--cx-ink); font-weight: 700; text-decoration: underline; text-underline-offset: 2px; }
.description-parent img { max-width: 100%; height: auto; }

a { color: inherit; }
p { margin: 0 0 1em; }
hr { border: 0; border-top: var(--cx-ring) solid var(--cx-ink); margin: 1.5rem 0; }
code { padding: .1rem .4rem; background: #eee; border-radius: 4px; font-size: 90%; }

/* ---- Footer: a black bar with white links ---- */
.footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 4px 6px;
  margin: 26px 6px 18px !important;
  padding: 8px 10px;
  background: var(--cx-ink);
  border: var(--cx-ring) solid var(--cx-paper);
  border-radius: var(--cx-radius);
}
.footer a, .footer a.spacing {
  display: inline-block;
  padding: 8px 10px;
  color: var(--cx-paper);
  font-size: .9rem;
  font-weight: 700;
  text-decoration: none;
  border-radius: 10px;
}
.footer a:hover, .footer a:focus-visible { background: var(--cx-paper); color: var(--cx-ink); }
.spacing { padding: 0 10px; }
.credit-txt, .credit-txt-clr { color: var(--cx-ink) !important; font-weight: 700; }

/* ---- Keyboard focus is always visible: white ring inside a black ring ---- */
a:focus-visible, .sharebutton:focus-visible, button:focus-visible {
  outline: 3px solid var(--cx-paper);
  outline-offset: 2px;
  box-shadow: 0 0 0 8px var(--cx-ink);
}

/* ---- CactiExchange link bars / Reddit Reputation card / member directory
        (markup from components/cacti-ledger.blade.php) ---- */
body .custom-horizontal-bar, body .custom-horizontal-bar2 { box-shadow: none; padding: 4px 8px; flex-direction: row; }
body .static-bar { background: var(--cx-ink); border-bottom: 0; }
body .dynamic-bar { background: var(--cx-paper); border-bottom: var(--cx-ring) solid var(--cx-ink); gap: 2px 4px; }
body .static-bar .custom-bar-link { color: var(--cx-paper); }
body .dynamic-bar .custom-bar-link { color: var(--cx-ink); text-decoration: underline; text-underline-offset: 3px; }
body .custom-bar-link { margin: 0 1px; padding: 7px 7px; font-weight: 700; font-size: .8rem; line-height: 1.2; border-radius: 10px; }
body .static-bar .custom-bar-link:hover { background: var(--cx-paper); color: var(--cx-ink); }
body .dynamic-bar .custom-bar-link:hover { background: var(--cx-ink); color: var(--cx-paper); }
body .dynamic-bar-header { width: 100%; margin: 4px 0 0; text-align: center; color: var(--cx-ink); font-size: .78rem; font-weight: 800; }

body .cacti-rep { order: 4; width: 100%; max-width: 560px; padding: 0 22px; color: var(--cx-ink); }
body .cacti-rep-card {
  background: var(--cx-paper); border: var(--cx-ring) solid var(--cx-ink); border-radius: var(--cx-radius);
  box-shadow: 5px 5px 0 var(--cx-ink); backdrop-filter: none;
}
body .cacti-badge, body .cacti-badge.vendor, body .cacti-badge.standing { background: var(--cx-ink); color: var(--cx-paper); }
body .cacti-badge span { opacity: 1; }
body .cacti-tx li { border-top: 1px solid var(--cx-ink); }
body .cacti-tx time, body .cacti-rep-foot { opacity: 1; }
body .cacti-community {
  opacity: 1; display: inline-block; background: var(--cx-ink); color: var(--cx-paper);
  padding: 6px 12px; border-radius: 10px;
}

body #member-directory {
  order: 5;
  width: calc(100% - 44px);
  max-width: 516px !important;
  box-sizing: border-box;
  margin: 8px auto 26px !important;
  padding: 16px 14px !important;
  background: var(--cx-paper);
  color: var(--cx-ink);
  border: var(--cx-ring) solid var(--cx-ink);
  border-radius: var(--cx-radius);
  box-shadow: 5px 5px 0 var(--cx-ink);
}
body #member-directory h2 { margin: 0 0 .2em; font-weight: 800; }
body #member-directory p { opacity: 1 !important; }
body #member-directory a { padding: 4px 2px; text-decoration: underline !important; text-decoration-thickness: 1px !important; text-underline-offset: 3px; }
body #member-directory a:hover { background: var(--cx-ink); color: var(--cx-paper) !important; }
body #member-directory svg { color: var(--cx-ink) !important; }

/* ---- "Report abuse" pill: give the icon its own black disc so it never sits on colour ---- */
.report-pill-container { left: 6px !important; bottom: 40px !important; }
.report-icon-container { cursor: pointer; }
.report-icon { width: 30px; height: 30px; top: 0 !important; left: 0 !important; background: var(--cx-ink); border: 2px solid var(--cx-paper); border-radius: 50%; box-sizing: border-box; }
.report-expanding-pill { background-color: var(--cx-ink) !important; }

/* ---- Utilities kept from Skeleton ---- */
.u-full-width { width: 100%; box-sizing: border-box; }
.u-max-full-width { max-width: 100%; box-sizing: border-box; }
/* CactiExchange theme — avatar, social icons and link buttons. */

@property --cx-hue {
  syntax: "<angle>";
  inherits: false;
  initial-value: 0deg;
}

/* Avatar: white disc, thick black ring, then one thin ring of moving colour. */
#avatar, .rounded-avatar {
  width: 132px !important;
  min-width: 0 !important;
  height: 132px !important;
  border-radius: 50%;
  object-fit: cover;
  background: var(--cx-paper) !important;
  border: 4px solid var(--cx-paper);
  box-shadow: 0 0 0 6px var(--cx-ink), 0 0 0 10px hsl(var(--cx-hue) 95% 62%), 0 0 0 13px var(--cx-ink);
  margin: 20px 0 8px;
  box-sizing: border-box;
}

.social-icon-div { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; padding: 0 0 22px; }
.social-link { text-decoration: none; border-radius: 50%; }
.social-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 48px; height: 48px; padding: 0;
  font-size: 22px;
  color: var(--cx-paper) !important;
  background: var(--cx-ink);
  border: var(--cx-ring) solid var(--cx-paper);
  border-radius: 50%;
  box-sizing: border-box;
}
.social-link:hover .social-icon, .social-link:focus-visible .social-icon {
  color: var(--cx-ink) !important; background: var(--cx-paper); border-color: var(--cx-ink);
}

/* Buttons: yin and yang take turns. */
.button {
  position: relative;
  display: block !important;
  min-height: 58px;
  margin: 0 6px 18px !important;
  padding: 16px 18px;
  box-sizing: border-box;
  background: var(--cx-paper);
  color: var(--cx-ink);
  border: var(--cx-ring) solid var(--cx-ink);
  border-radius: var(--cx-radius);
  box-shadow: 5px 5px 0 var(--cx-ink);
  font-family: inherit;
  font-size: 1.05rem;
  font-weight: 800;
  line-height: 1.3;
  text-align: center;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
}
.button-entrance:nth-of-type(odd) > .button {
  background: var(--cx-ink);
  color: var(--cx-paper);
  border-color: var(--cx-paper);
  box-shadow: 5px 5px 0 var(--cx-paper);
}
@media (hover: hover) {
  .button:hover { background: var(--cx-ink); color: var(--cx-paper); border-color: var(--cx-paper); box-shadow: 5px 5px 0 var(--cx-paper); }
  .button-entrance:nth-of-type(odd) > .button:hover { background: var(--cx-paper); color: var(--cx-ink); border-color: var(--cx-ink); box-shadow: 5px 5px 0 var(--cx-ink); }
}
.button:active { transform: translate(5px, 5px) !important; box-shadow: 0 0 0 transparent !important; }

.icon {
  position: relative;
  right: 8px;
  bottom: 1px;
  width: 22px;
  height: 22px;
  vertical-align: middle;
}
/* LinkStack's brand icons are mostly white glyphs: each one gets its own black disc, so it reads on a white button too. */
img.icon { background: var(--cx-ink); border-radius: 50%; box-shadow: 0 0 0 4px var(--cx-ink); margin-right: 4px; }
i.icon { color: inherit !important; width: auto; height: auto; font-size: 1.05em; }

h1 svg { color: var(--cx-paper) !important; }
/* CactiExchange theme — share button (top right): white disc, black ring. */
.sharediv { position: relative; top: 0; right: 0; padding: 14px 16px 0; width: 100%; max-width: 560px; margin: 0 auto; box-sizing: border-box; }
.sharebutton, sharebutton {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-width: 48px; height: 48px; padding: 0 12px;
  box-sizing: border-box;
  background: var(--cx-paper);
  color: var(--cx-ink);
  border: var(--cx-ring) solid var(--cx-ink);
  border-radius: 999px;
  font-size: 1rem; font-weight: 800; line-height: 1;
  cursor: pointer;
}
.share-icon { color: var(--cx-ink) !important; width: auto; height: auto; padding: 0; }
.sharebutton:hover { background: var(--cx-ink); color: var(--cx-paper); border-color: var(--cx-paper); }
.sharebutton:hover .share-icon { color: var(--cx-paper) !important; filter: none; }
@media screen and (max-width: 600px) { .sharebutton-mb { display: none; } }
.toastdiv { display: flex; align-items: center; justify-content: center; }
.toastbox { width: 280px; padding: 10px; background: var(--cx-ink); color: var(--cx-paper); border-radius: 8px; position: fixed; top: 105%; transition: transform .3s linear; z-index: 2; text-align: center; }
.toastbox.toast-tox--active { transform: translateY(-150px); }
/* CactiExchange theme — motion. Everything here is transform / opacity (compositor only),
   except the avatar's colour ring, which repaints a 150px box about twice a second. */

@keyframes cx-drift {
  0%   { transform: translate3d(-4%, -3%, 0) rotate(0deg) scale(1); }
  50%  { transform: translate3d(4%, 3%, 0) rotate(8deg) scale(1.08); }
  100% { transform: translate3d(-2%, 5%, 0) rotate(-6deg) scale(1.03); }
}
/* 60s loop: dusk -> bloom -> succulent greens -> dusk */
@keyframes cx-bloom {
  0%, 12%  { opacity: 0; }
  33%, 45% { opacity: 1; }
  66%, 100% { opacity: 0; }
}
@keyframes cx-succulent {
  0%, 45%  { opacity: 0; }
  66%, 80% { opacity: 1; }
  100%     { opacity: 0; }
}
@keyframes cx-hue { to { --cx-hue: 360deg; } }

.parallax-background { animation: cx-drift 48s ease-in-out infinite alternate; }
.parallax-background > .object2 { animation: cx-bloom 60s ease-in-out infinite; }
.parallax-background > .object3 { animation: cx-succulent 60s ease-in-out infinite; }
#avatar { animation: cx-hue 45s steps(90) infinite; }

/* Entrance: quick and small, never hides content for long. */
.button-entrance { animation: cx-rise .45s cubic-bezier(.2, .7, .2, 1) both; animation-delay: calc(var(--delay, 0s) / 14); }
.fadein { animation: cx-fade .5s ease-out both; }
#avatar.fadein { animation: cx-fade .5s ease-out both, cx-hue 45s steps(90) infinite; }
@keyframes cx-rise { from { opacity: 0; transform: translateY(10px); } }
@keyframes cx-fade { from { opacity: 0; } }

.button-hover, .credit-hover { transition: transform .12s ease-out, box-shadow .12s ease-out; }
@media (hover: hover) {
  .button-hover:hover { transform: translate(2px, 2px); }
}
.footer-hover { transition: none; }

/* Reduced motion: a still picture. All three skies blended once, nothing moves or fades. */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
  .parallax-background { transform: none; }
  .parallax-background > .object2 { opacity: .45; }
  .parallax-background > .object3 { opacity: .3; }
  .button-entrance, .fadein { opacity: 1 !important; transform: none !important; }
}
