/* ============================================================
   WannaBuddy — Shared Stylesheet
   Used by: index.html (homepage), signup-modal.html, messaging.html
   Fonts (loaded via <link> in each page's <head>):
     Fredoka     — display / headings
     Inter       — body copy
     Space Mono  — eyebrows, tags, index-card text
   ============================================================ */

/* ---------- Design tokens ---------- */
:root {
  --cork: #c99a63;
  --cork-dark: #a97c47;
  --cork-darker: #8a6438;
  --paper: #fffdf7;
  --ink: #20303f;
  --ink-soft: #4d5d6b;
  --green: #3f7d5c;
  --green-dark: #2f6248;
  --yellow: #f2b441;
  --blue: #4a90c4;
  --cream: #faf3e4;
  --coral: #e0684f;
  --line: rgba(32, 48, 63, .08);
}

/* ---------- Reset & base ---------- */
* {
  box-sizing: border-box;
}

html {
  height: 100%;
}

body {
  font-family: 'Inter', sans-serif;
  color: var(--ink);
  min-height: 100%;
}

a {
  text-decoration: none;
}

.tag-mono {
  font-family: 'Space Mono', monospace;
  letter-spacing: .06em;
  text-transform: uppercase;
  font-size: .75rem;
}

h1,
h2,
h3,
.display-font {
  font-family: 'Fredoka', sans-serif;
  font-weight: 600;
  color: var(--ink);
}

/* ---------- Page backgrounds ----------
   Scoped to a class on <body> so pages don't bleed into each other:
   <body class="page-home">, <body class="page-signup">, <body class="page-messaging"> */
body.page-home {
  background: var(--cream);
}

body.page-messaging {
  background: var(--cream);
  overflow: hidden;
}

body.page-signup {
  background-color: var(--cork);
  background-image:
    radial-gradient(circle at 15% 20%, rgba(255, 255, 255, .10) 0, transparent 45%),
    radial-gradient(circle at 80% 70%, rgba(0, 0, 0, .10) 0, transparent 50%),
    repeating-radial-gradient(circle at 20% 30%, rgba(0, 0, 0, .05) 0, rgba(0, 0, 0, .05) 1px, transparent 2px, transparent 14px),
    repeating-radial-gradient(circle at 70% 60%, rgba(255, 255, 255, .06) 0, rgba(255, 255, 255, .06) 1px, transparent 2px, transparent 11px);
}

/* ---------- Shared buttons ---------- */
.btn-wb-primary {
  background: var(--coral);
  border: none;
  color: #fff;
  font-weight: 600;
  padding: .6rem 1.4rem;
  border-radius: 10px;
  box-shadow: 0 3px 0 var(--cork-darker);
}

.btn-wb-primary:hover {
  background: #c85539;
  color: #fff;
  transform: translateY(1px);
  box-shadow: 0 2px 0 var(--cork-darker);
}

.btn-wb-ghost {
  color: var(--ink);
  font-weight: 600;
  border: 1.5px solid rgba(32, 48, 63, .18);
  border-radius: 10px;
  padding: .5rem 1.1rem;
}

.btn-wb-ghost:hover {
  border-color: var(--ink);
  color: var(--ink);
}


/* ============================================================
   HOMEPAGE — index.html
   ============================================================ */

/* nav */
.navbar-wb {
  background: var(--paper);
  /* border-bottom: 1px solid var(--line); */
}

.navbar-wb .navbar-brand {
  font-family: 'Fredoka', sans-serif;
  font-weight: 700;
  font-size: 1.7rem;
  color: var(--ink);
}

.navbar-wb .navbar-brand .dot {
  color: var(--coral);
}

.navbar-wb .nav-link {
  font-weight: 500;
  color: var(--ink-soft);
  margin: 0 .5rem;
}

.navbar-wb .nav-link:hover {
  color: var(--ink);
}

/* hero / corkboard */
.corkboard {
  position: relative;
  background-color: var(--cork);
  background-image:
    radial-gradient(circle at 15% 20%, rgba(255, 255, 255, .10) 0, transparent 45%),
    radial-gradient(circle at 80% 70%, rgba(0, 0, 0, .10) 0, transparent 50%),
    repeating-radial-gradient(circle at 20% 30%, rgba(0, 0, 0, .05) 0, rgba(0, 0, 0, .05) 1px, transparent 2px, transparent 14px),
    repeating-radial-gradient(circle at 70% 60%, rgba(255, 255, 255, .06) 0, rgba(255, 255, 255, .06) 1px, transparent 2px, transparent 11px);
  border-bottom: 14px solid var(--cork-darker);
  padding: 5.5rem 0 6rem;
  overflow: hidden;
}

.corkboard-msg {
  position: relative;
  background-color: var(--cork);
  background-image:
    radial-gradient(circle at 15% 20%, rgba(255, 255, 255, .10) 0, transparent 45%),
    radial-gradient(circle at 80% 70%, rgba(0, 0, 0, .10) 0, transparent 50%),
    repeating-radial-gradient(circle at 20% 30%, rgba(0, 0, 0, .05) 0, rgba(0, 0, 0, .05) 1px, transparent 2px, transparent 14px),
    repeating-radial-gradient(circle at 70% 60%, rgba(255, 255, 255, .06) 0, rgba(255, 255, 255, .06) 1px, transparent 2px, transparent 11px);
  border-bottom: 14px solid var(--cork-darker);
  padding: 0;
  overflow: hidden;
}

.frame-strip {
  position: absolute;
  inset: 0 0 auto 0;
  height: 16px;
  background: linear-gradient(180deg, rgba(0, 0, 0, .18), transparent);
}

.hero-copy .tag-mono {
  color: #3a2a15;
  opacity: .75;
}

.hero-copy h1 {
  font-size: clamp(2.2rem, 4.4vw, 3.4rem);
  line-height: 1.08;
  color: #26160a;
  margin: .6rem 0 1.1rem;
}

.hero-copy p.lead-wb {
  color: #3a2a15;
  font-size: 1.1rem;
  max-width: 34rem;
  margin-bottom: 1.9rem;
}

.pin-card-summary {
  background: var(--paper);
  border-radius: 8px;
  padding: 1rem 1.1rem;
  box-shadow: 0 10px 18px rgba(0, 0, 0, .22), 0 2px 0 rgba(0, 0, 0, .05);
  font-family: 'Space Mono', monospace;
  font-size: .85rem;
  color: var(--ink);
  position: relative;
}

/* pinned index cards (hero) */
.pin-card {
  background: transparent;
  background: var(--paper);
  border-radius: 8px;
  padding: 1rem 1.1rem;
  box-shadow: 0 10px 18px rgba(0, 0, 0, .22), 0 2px 0 rgba(0, 0, 0, .05);
  font-family: 'Space Mono', monospace;
  font-size: .85rem;
  color: var(--ink);
  position: relative;
  width: 210px;
}

.pin-card::before {
  content: "";
  position: absolute;
  top: -9px;
  left: 50%;
  transform: translateX(-50%);
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #ff8a75, var(--coral) 60%, #a8402c 100%);
  box-shadow: 0 2px 3px rgba(0, 0, 0, .35);
}

.pin-card .conv-item .conv-pin {
  display: none;
}

.card-field {
  position: relative;
  height: 420px;
}

.card-field .pin-card {
  position: absolute;
}

.c1 {
  top: 0;
  left: 2%;
  transform: rotate(-6deg);
}

.c2 {
  top: 8%;
  left: 42%;
  transform: rotate(4deg);
}

.c3 {
  top: 46%;
  left: 0%;
  transform: rotate(3deg);
}

.c4 {
  top: 56%;
  left: 36%;
  transform: rotate(-4deg);
  width: 190px;
}

.c5 {
  top: 2%;
  left: 74%;
  transform: rotate(7deg);
  width: 180px;
  display: none;
}

.c0 {
  top: 12px;
  left: 2%;
  /*  transform: rotate(-1deg); */
  width: 98%;
  margin-bottom: 10px;
}

.pin-card .c0 {
  width: 90%;
  box-sizing: border-box;
  white-space: normal;
  overflow-wrap: break-word;
  word-break: break-word;
  margin-top: -4px;
}

.header-remark {
  max-width: 98%;
  box-sizing: border-box;
  word-wrap: break-word;
  /* Forces long text strings to break */
  overflow-wrap: break-word;
  /*word-break: break-all;*/
}

@media (min-width:992px) {
  .c5 {
    display: block;
  }
}

/* Below lg, abandon the scattered/rotated absolute layout — at narrow widths
   the fixed card widths (190–210px) positioned by percentage overlap and get
   clipped by .corkboard's overflow:hidden. Stack them cleanly instead. */
@media (max-width:991.98px) {
  .card-field {
    height: auto;
    display: flex;
    flex-direction: column;
    gap: 1.1rem;
    padding: .25rem 0 1rem;
  }

  .card-field .pin-card {
    position: static;
    width: 98% !important;
    max-width: 360px;
    transform: none !important;
  }
}

.pin-card .pc-label {
  display: block;
  text-transform: uppercase;
  font-size: .65rem;
  letter-spacing: .08em;
  color: var(--green-dark);
  margin-bottom: .35rem;
  font-weight: 700;
}

/* content sections */
section {
  padding: 5rem 0;
}

.eyebrow {
  color: var(--green-dark);
  font-weight: 700;
}

.step-num {
  font-family: 'Fredoka', sans-serif;
  font-weight: 700;
  font-size: 1.6rem;
  color: var(--paper);
  background: var(--green);
  width: 52px;
  height: 52px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.step-line {
  border-left: 2px dashed rgba(63, 125, 92, .35);
  margin-left: 26px;
  padding-left: 26px;
}

.step-block:last-child .step-line {
  border-color: transparent;
  padding-bottom: 0;
}

.pillar-card {
  background: var(--paper);
  border-radius: 16px;
  padding: 2.2rem 1.8rem;
  height: 100%;
  border: 1px solid rgba(32, 48, 63, .07);
  transition: transform .15s ease, box-shadow .15s ease;
}

.pillar-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 30px rgba(32, 48, 63, .10);
}

.pillar-icon {
  width: 54px;
  height: 54px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 1.1rem;
}

.pillar-icon.green {
  background: rgba(63, 125, 92, .12);
  color: var(--green-dark);
}

.pillar-icon.blue {
  background: rgba(74, 144, 196, .14);
  color: var(--blue);
}

.pillar-icon.yellow {
  background: rgba(242, 180, 65, .20);
  color: #8a5b0e;
}

.section-cream {
  background: var(--cream);
}

.section-paper {
  background: var(--paper);
}

.reassure-strip {
  background: var(--ink);
  color: #fff;
  border-radius: 20px;
  padding: 2.6rem 2.2rem;
}

.reassure-strip h3 {
  color: #fff;
}

.reassure-strip .divider-dot {
  color: var(--coral);
}

.reassure-item {
  border-left: 3px solid var(--coral);
  padding-left: 1rem;
}

.cta-band {
  background: linear-gradient(135deg, var(--green) 0%, var(--green-dark) 100%);
  border-radius: 22px;
  padding: 3.2rem 2.5rem;
  color: #fff;
  position: relative;
  overflow: hidden;
}

.cta-band h2 {
  color: #fff;
}

.cta-band .btn-wb-primary {
  box-shadow: 0 3px 0 #a83f2b;
}

footer {
  background: var(--ink);
  color: rgba(255, 255, 255, .65);
  padding: 10px;
}

footer a {
  color: rgba(255, 255, 255, .85);
}

footer a:hover {
  color: #fff;
}

footer .fw-brand {
  font-family: 'Fredoka', sans-serif;
  font-weight: 700;
  color: #fff;
  font-size: 1.25rem;
}

@media (prefers-reduced-motion: reduce) {
  .pillar-card {
    transition: none;
  }
}


/* ============================================================
   SIGNUP MODAL — signup-modal.html
   ============================================================ */

/* demo backdrop content behind the modal */
.demo-nav {
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}

.demo-nav .brand {
  font-family: 'Fredoka', sans-serif;
  font-weight: 700;
  font-size: 1.3rem;
}

.demo-nav .brand .dot {
  color: var(--coral);
}

.demo-hero-copy {
  color: #26160a;
  padding: 6rem 0;
}

.demo-hero-copy h1 {
  font-size: clamp(1.9rem, 4vw, 2.8rem);
  color: #26160a;
}

/* modal styled as a large pinned index card */
.modal-content.wb-card {
  border: none;
  border-radius: 6px;
  background: var(--paper);
  box-shadow: 0 30px 60px rgba(20, 15, 5, .35), 0 2px 0 rgba(0, 0, 0, .05);
  overflow: visible;
}

.wb-pin {
  position: absolute;
  top: -14px;
  left: 50%;
  transform: translateX(-50%);
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #ff8a75, var(--coral) 60%, #a8402c 100%);
  box-shadow: 0 3px 5px rgba(0, 0, 0, .4);
  z-index: 5;
}

.wb-modal-header {
  border: none;
  padding: 2.1rem 2.3rem 0;
}

.wb-modal-header .btn-close {
  margin-top: -.5rem;
}

.wb-modal-body {
  padding: 0.5rem 2.3rem 2.3rem;
}

.wb-eyebrow {
  color: var(--green-dark);
  font-weight: 700;
}

.form-label.wb {
  font-weight: 600;
  font-size: .88rem;
  color: var(--ink);
  margin-bottom: .35rem;
}

.form-control.wb-input {
  border-radius: 10px;
  border: 1.5px solid rgba(32, 48, 63, .15);
  padding: .65rem .9rem;
}

.form-control.wb-input:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 .2rem rgba(63, 125, 92, .15);
}

/* interest chips */
.chip-group {
  display: flex;
  flex-wrap: wrap;
  gap: .55rem;
}

.chip {
  font-family: 'Space Mono', monospace;
  font-size: .8rem;
  border: 1.5px solid rgba(32, 48, 63, .18);
  background: #fff;
  color: var(--ink-soft);
  border-radius: 999px;
  padding: .42rem .95rem;
  cursor: pointer;
  user-select: none;
  transition: all .12s ease;
}

.chip:hover {
  border-color: var(--ink);
  color: var(--ink);
}

.chip.active {
  background: var(--green);
  border-color: var(--green);
  color: #fff;
}

.chip.active.place {
  background: var(--blue);
  border-color: var(--blue);
}

.chip-count {
  font-family: 'Space Mono', monospace;
  font-size: .75rem;
  color: var(--ink-soft);
}

.chip-count.ok {
  color: var(--green-dark);
  font-weight: 700;
}

.editposting {
  color: white;
}

.divider-label {
  font-size: .7rem;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--ink-soft);
  font-weight: 700;
  margin: 1.3rem 0 .6rem;
}

.btn-wb-submit {
  background: var(--coral);
  border: none;
  color: #fff;
  font-weight: 600;
  padding: .75rem 1rem;
  border-radius: 10px;
  width: 100%;
  box-shadow: 0 3px 0 var(--cork-darker);
  transition: transform .1s ease;
}

.btn-dm-submit {
  background: var(--coral);
  border: none;
  color: #fff;
  font-weight: 600;
  padding: .75rem 1rem;
  border-radius: 10px;
  width: 100%;
  box-shadow: 0 3px 0 var(--cork-darker);
  transition: transform .1s ease;
}

.btn-wb-submit:disabled {
  background: #d9cfc2;
  box-shadow: 0 3px 0 #b9ac99;
  color: #8a7f70;
  cursor: not-allowed;
}

.btn-wb-submit:not(:disabled):hover {
  background: #c85539;
  color: #fff;
}

.btn-wb-submit:not(:disabled):active {
  transform: translateY(2px);
  box-shadow: 0 1px 0 var(--cork-darker);
}

.wb-fineprint {
  font-size: .78rem;
  color: var(--ink-soft);
}

.wb-fineprint a {
  color: var(--green-dark);
  font-weight: 600;
}

@media (max-width: 575.98px) {
  .wb-modal-header {
    padding: 1.6rem 1.3rem 0;

    margin-top: 35px;
    margin-bottom: 35px;
  }

  .wb-modal-body {
    padding: .5rem 1.3rem 1.6rem;
  }


  .c0 {
    top: 35px !important;
    margin-bottom: 50px !important;
    transform: rotate(0deg) !important;
  }
}


/* ============================================================
   MESSAGING SCREEN — messaging.html
   ============================================================ */

/* top toolbar — distinct component from .navbar-wb on the homepage
   (fixed-height app chrome, not a collapsing Bootstrap navbar) */
.app-topbar {
  background: var(--paper);
  border-bottom: 1px solid var(--line);
  height: 64px;
}

.app-topbar .brand {
  font-family: 'Fredoka', sans-serif;
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--ink);
}

.app-topbar .brand .dot {
  color: var(--coral);
}

.avatar-me {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--green);
  color: #fff;
  font-weight: 700;
  font-size: .85rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Fredoka', sans-serif;
}

.app-shell {
  height: calc(100vh - 64px);
  height: calc(100dvh - 64px);
  /* accounts for mobile browser address bar; ignored where unsupported */
}

.thread-back-btn {
  display: none;
  background: none;
  border: none;
  font-size: 1.3rem;
  line-height: 1;
  color: var(--ink);
  padding: .2rem .4rem .2rem 0;
  cursor: pointer;
}

/* conversation list */
.conv-pane {
  background: var(--paper);
  border-right: 1px solid var(--line);
  height: 100%;
  display: flex;
  flex-direction: column;
}

.conv-search {
  position: relative;
  padding: 1.1rem 1.1rem .8rem;
  border-bottom: 1px solid var(--line);
}

.conv-search .form-control {
  border-radius: 10px;
  border: 1.5px solid var(--line);
  padding: .5rem .8rem .5rem 2.2rem;
  background: var(--cream);
  font-size: .9rem;
}

.conv-search .search-icon {
  position: absolute;
  left: 1.85rem;
  top: 1.75rem;
  opacity: .45;
}

.conv-list {
  padding: 10px;
}

.subject-line {
  background: var(--paper) !important;
  background-color: white !important;
  border-radius: 10px;
  /*padding-left: 10px; */
}

.thread-body .subject-line {
  /*  padding-left: 10px; */
  margin-bottom: 2px;
}

.conv-list-old {
  overflow-y: auto;
  flex: 1;
}

.pin-list {
  content: "";
  position: absolute;
  top: -9px;
  left: 50%;
  transform: translateX(-50%);
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #ff8a75, var(--coral) 60%, #a8402c 100%);
  box-shadow: 0 2px 3px rgba(0, 0, 0, .35);
}

.conv-pin {
  position: absolute;
  top: -6px;
  left: 50%;
  /*10px;*/
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #ff8a75, var(--coral) 60%, #a8402c 100%);
  box-shadow: 0 2px 3px rgba(0, 0, 0, .35);
  z-index: 2;
}

.conv-tape {
  position: absolute;
  top: -22px;
  left: 50%;
  /*10px;*/
  width: 25px;
  height: 28px;
  border-radius: 2px;
  background: rgba(255, 255, 240, 0.75);
  border-left: 1px dashed rgba(0, 0, 0, 0.1);
  border-right: 1px dashed rgba(0, 0, 0, 0.1);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
  /* background:lightyellow;*/
  box-shadow: 0 2px 3px rgba(0, 0, 0, .35);
  z-index: 2;
}

.conv-list .conv-item {
  border: 1px solid gray;

}

.conv-item {
  position: relative;
  border-radius: 8px;
  background: var(--paper);
  /*  background: var(--cream);*/
  display: flex;
  gap: .8rem;
  align-items: flex-start;
  padding-left: 4px;
  padding-top: 4px;
  padding-bottom: 8px;
  padding-top: 8px;
  margin-bottom: 16px;
  /*  border-bottom: 1px solid var(--line); */
  cursor: pointer;
  transition: background .1s ease;
}

.conv-item.active {
  /*background: rgba(63, 125, 92, .08);*/
  border-left: 3px solid var(--green);
  padding-left: calc(1.1rem - 8px);
}

.remark-text {
  white-space: pre-wrap;
  font-size: 1rem;
  /*don't lose the end-of-line formatting*/
}

.remark-section {
  position: relative;
  z-index: 2;
  /* Sits visually above/behind as intended */
  margin-top: 1rem;
  /* Adjust margin to give the tilt rotation breathing room */
  clear: both;
}

.conv-avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Fredoka', sans-serif;
  font-weight: 700;
  color: #fff;
  font-size: .95rem;
  background: color-mix(in srgb, var(--blue) 10%, transparent);
}

.conv-meta {
  flex: 1;
  min-width: 0;
  margin-left: -10px;
  margin-top: -6px;
}

.conv-top-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: .5rem;
}

.conv-name {
  font-weight: 600;
  font-size: .92rem;
}

.conv-time {
  font-size: .72rem;
  color: var(--ink-soft);
  white-space: nowrap;
}

.conv-tag {
  display: inline-block;
  font-family: 'Space Mono', monospace;
  font-size: .65rem;
  text-transform: uppercase;
  letter-spacing: .04em;
  padding: .3rem .3rem;
  border-radius: 999px;
  /*margin: .2rem 0 .3rem;*/
  margin-left: -15px;
  color: #fff;
}


.tag-place {
  background: var(--green);
  font-weight: bold;
}

.tag-activity {
  text-align: center;
  background: var(--blue);
  font-weight: bold;
}

.tag-interest {
  background: var(--yellow);
  color: #5c3d09;
  font-weight: bold;
}

.conv-preview {
  margin-left: -30px;
  font-size: 1rem;
  color: var(--ink-soft);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.conv-title {
  font-size: 1rem;
  color: var(--ink-soft);
  background-color: var(--paper);
  /*  padding: 8px; */
  border-radius: 8px;
}

.unread-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--coral);
  flex-shrink: 0;
  margin-top: .4rem;
}

/* thread pane */
.thread-pane {
  flex: 1;
  /* Splits space equally */
  height: 100%;
  /* Fills parent container height */
  overflow-y: auto;
  /* Enables separate vertical scrolling */
  /*  border: 1px solid #ccc;
  border-radius: 8px; */
  padding: 15px;
}

.thread-pane-old {
  height: 100%;
  display: flex;
  flex-direction: column;
  background: var(--cream);
}

.thread-header {
  /*(background: var(--paper);*/
  border-bottom: 1px solid var(--line);
  padding: .85rem 1.4rem;
  display: flex;
  align-items: center;
  gap: .8rem;
  margin-top: 40px;
  margin-bottom: 18px;
}

.thread-header .conv-avatar {
  width: 40px;
  height: 40px;
  font-size: .85rem;
}

.thread-header .h-name {
  font-weight: 700;
  font-size: .98rem;
  margin: 0;
}

.thread-header .h-sub {
  font-size: .78rem;
}

/* color:var(--ink-soft); */

.thread-body {
  flex: 1;
  overflow-y: auto;
  padding-right: 15px;
}

.thread-body .conv-title {
  margin-bottom: -16px;
}

.day-sep {
  text-align: center;
  font-size: .72rem;
  color: var(--ink-soft);
  text-transform: uppercase;
  letter-spacing: .06em;
  margin: 1.2rem 0;
}

.plan-card {
  background: var(--paper);
  border: 1.5px dashed var(--green);
  border-radius: 12px;
  padding: .9rem 1.1rem;
  max-width: 340px;
  margin: 0 auto 1.4rem;
  text-align: center;
}

.plan-card .tag-mono {
  color: var(--green-dark);
}

.plan-card h4 {
  font-size: 1rem;
  margin: .3rem 0 .2rem;
}

.plan-card p {
  font-size: .82rem;
  color: var(--ink-soft);
  margin-bottom: .7rem;
}

.msg-row {
  display: flex;
  margin-bottom: .9rem;
}

.msg-row.me {
  justify-content: flex-end;
}

.bubble {
  max-width: 60%;
  padding: .65rem .95rem;
  border-radius: 16px;
  font-size: .9rem;
  line-height: 1.4;
}

.msg-row.them .bubble {
  background: var(--paper);
  border: 1px solid var(--line);
  border-bottom-left-radius: 4px;
  color: var(--ink);
}

.msg-row.me .bubble {
  background: var(--green);
  color: #fff;
  border-bottom-right-radius: 4px;
}

.msg-time {
  font-size: .68rem;
  color: var(--ink-soft);
  margin-top: .2rem;
}

.msg-row.me .msg-time {
  text-align: right;
}

.composer {
  position: relative;
  background: var(--paper);
  border-top: 1px solid var(--line);
  margin-right: 15px;
  margin-top: 20px;
  margin-left: 12px;
  border-radius: 10px;
}

.composer .btn-suggest {
  border: 1.5px solid var(--green);
  color: var(--green-dark);
  background: transparent;
  font-size: .78rem;
  font-weight: 600;
  border-radius: 999px;
  padding: .3rem .85rem;
  white-space: nowrap;
}

.composer .btn-suggest:hover {
  background: rgba(63, 125, 92, .1);
}

.composer-input-row {
  display: flex;
  align-items: center;
  gap: .4rem;
  margin-top: .4rem;
}

.composer textarea {
  border-radius: 14px;
  border: 2.5px solid var(--line);
  resize: none;
  padding: .6rem .9rem;
  margin-left: 12px;
  margin-bottom: 16px;
  font-size: .9rem;
}

.composer textarea:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 .2rem rgba(63, 125, 92, .15);
}

.btn-send {
  background: var(--coral);
  border: none;
  color: #fff;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 0 var(--cork-darker);
  margin-bottom: 16px;
  margin-right: 4px;
}

.btn-send:hover {
  background: #c85539;
}

.btn-report-posting {
  border-width: 0;
  background: transparent;
  margin-top: -12px;
}

/* Ensure post header or card doesn't clip the dropdown menu */
.card-header,
.posting-card,
.chip-container {
  overflow: visible !important;
}

@media (max-width: 767.98px) {

  /* Hide right detail pane by default on mobile */
  .detail-pane {
    display: none;
    width: 100% !important;
  }

  /* Show left list pane by default on mobile */
  .conv-pane {
    display: flex;
    flex-direction: column;
    width: 100% !important;
  }

  /* When active: hide list pane, show detail pane */
  .app-shell.mobile-thread-active .conv-pane {
    display: none !important;
  }

  .app-shell.mobile-thread-active .detail-pane {
    display: flex !important;
    flex-direction: column;
  }

  .thread-back-btn {
    display: inline-flex;
    align-items: center;
  }
}


/* ============================================================
   COMMUNITY GUIDELINES — guidelines.html
   ============================================================ */

body.page-guidelines {
  background: var(--paper);
}

.docs-header {
  background: var(--cream);
  border-bottom: 1px solid var(--line);
  padding: 3rem 0 2.4rem;
}

.docs-eyebrow {
  color: var(--green-dark);
}

.docs-header h1 {
  font-size: clamp(1.9rem, 3.6vw, 2.6rem);
}

.docs-meta {
  font-size: .85rem;
  color: var(--ink-soft);
}

.docs-lede {
  max-width: 44rem;
  color: var(--ink-soft);
  font-size: 1.02rem;
}

.docs-shell {
  padding: 2.6rem 0 5rem;
}

/* table of contents */
.toc-card {
  background: var(--cream);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: .9rem;
  display: flex;
  flex-direction: column;
}

.sticky-toc {
  position: sticky;
  top: 5.5rem;
  max-height: calc(100vh - 7rem);
  overflow-y: auto;
}

.toc-link {
  font-size: .85rem;
  color: var(--ink-soft);
  padding: .4rem .6rem;
  border-radius: 8px;
  white-space: pre-wrap;
}

.toc-link:hover {
  background: rgba(63, 125, 92, .08);
  color: var(--ink);
}

.toc-toggle {
  background: var(--cream);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: .7rem 1rem;
  font-weight: 600;
  text-align: left;
  color: var(--ink);
}

/* content typography */
.docs-content {
  font-size: 1.02rem;
  line-height: 1.75;
  color: var(--ink);
}

.docs-content section {
  padding: 0 0 2.6rem;
  scroll-margin-top: 5.5rem;
}

.docs-content h2 {
  font-size: 1.5rem;
  margin-bottom: .9rem;
  border-top: 1px solid var(--line);
  padding-top: 2rem;
}

.docs-content section:first-of-type h2 {
  border-top: none;
  padding-top: 0;
}

.docs-content h3 {
  font-size: 1.1rem;
  margin: 1.4rem 0 .6rem;
}

.docs-content p {
  color: var(--ink);
}

.docs-content ul {
  padding-left: 1.3rem;
}

.docs-content li {
  margin-bottom: .4rem;
}

.docs-content a {
  color: var(--green-dark);
  font-weight: 600;
  text-decoration: underline;
  text-decoration-color: rgba(47, 98, 72, .3);
}

.docs-content a:hover {
  color: var(--ink);
}

/* callouts */
.callout {
  border-radius: 12px;
  padding: 1rem 1.2rem;
  margin: 1.1rem 0;
  font-size: .95rem;
}

.callout-label {
  display: block;
  font-family: 'Space Mono', monospace;
  text-transform: uppercase;
  letter-spacing: .05em;
  font-size: .7rem;
  font-weight: 700;
  margin-bottom: .4rem;
}

.callout-note {
  background: rgba(74, 144, 196, .08);
  border: 1px solid rgba(74, 144, 196, .3);
}

.callout-note .callout-label {
  color: var(--blue);
}

.callout-critical {
  background: rgba(224, 104, 79, .08);
  border: 1px solid rgba(224, 104, 79, .35);
}

.callout-critical .callout-label {
  color: var(--coral);
}

/* scope cards (is for / is not for) */
.scope-card {
  border-radius: 12px;
  padding: 1.1rem 1.2rem;
  height: 100%;
  border: 1.5px solid var(--line);
}

.scope-card .tag-mono {
  font-weight: 700;
}

.scope-card p {
  margin: .5rem 0 0;
  font-size: .92rem;
}

.scope-yes {
  border-color: rgba(63, 125, 92, .35);
  background: rgba(63, 125, 92, .06);
}

.scope-yes .tag-mono {
  color: var(--green-dark);
}

.scope-no {
  border-color: rgba(224, 104, 79, .35);
  background: rgba(224, 104, 79, .06);
}

.scope-no .tag-mono {
  color: var(--coral);
}

/* contact cards */
.contact-card {
  background: var(--cream);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: .9rem 1.1rem;
}

.contact-card .tag-mono {
  color: var(--ink-soft);
  display: block;
  margin-bottom: .3rem;
}

@media (max-width: 991.98px) {
  .sticky-toc {
    position: static;
    max-height: none;
  }
}



/* ============================================================
   MESSAGE ACTIONS + COMPOSE/EDIT MODAL — messaging.html
   ============================================================ */

/* kebab menu that appears on your own message bubbles */
.msg-row.me .bubble-wrap {
  position: relative;
}

.msg-actions {
  position: absolute;
  top: -.6rem;
  right: -.4rem;
  opacity: 0;
  transition: opacity .12s ease;
}

.msg-row.me:hover .msg-actions,
.msg-row.me .msg-actions.show {
  opacity: 1;
}

.msg-actions-btn {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--paper);
  color: var(--ink-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .8rem;
  box-shadow: 0 2px 4px rgba(32, 48, 63, .12);
}

.msg-actions-btn:hover {
  background: var(--cream);
  color: var(--ink);
}

.msg-edited-tag {
  font-size: .68rem;
  color: var(--ink-soft);
  margin-left: .35rem;
  font-style: italic;
}

/* theme Bootstrap's dropdown to match the card system */
.msg-actions .dropdown-menu {
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: 0 10px 24px rgba(32, 48, 63, .15);
  padding: .4rem;
  font-size: .88rem;
}

.msg-actions .dropdown-item {
  border-radius: 7px;
  padding: .4rem .7rem;
}

.msg-actions .dropdown-item:hover {
  background: var(--cream);
}

.msg-actions .dropdown-item.danger {
  color: #c0392b;
}

.msg-actions .dropdown-item.danger:hover {
  background: rgba(192, 57, 43, .08);
}

/* "expand to compose" icon next to the inline composer */
.expand-compose-btn {
  background: none;
  border: none;
  color: var(--ink-soft);
  font-size: 1.05rem;
  padding: .3rem;
  flex-shrink: 0;
}

.expand-compose-btn:hover {
  color: var(--ink);
}

/* delete-confirmation quoted preview */
.delete-preview {
  background: var(--cream);
  border-left: 3px solid var(--coral);
  padding: .7rem .9rem;
  border-radius: 8px;
  font-size: .88rem;
  color: var(--ink-soft);
  font-style: italic;
  margin: .8rem 0 0;
  max-height: 6rem;
  overflow-y: auto;
}

.char-count {
  font-size: .72rem;
  color: var(--ink-soft);
}

.char-count.near-limit {
  color: var(--coral);
  font-weight: 600;
}

/* destructive action — deliberately a deeper red than the coral used for
   normal primary actions (btn-wb-primary), so delete reads as more severe */
.btn-wb-danger {
  background: #c0392b;
  border: none;
  color: #fff;
  font-weight: 600;
  padding: .6rem 1.4rem;
  border-radius: 10px;
  box-shadow: 0 3px 0 #8e2c20;
}

.btn-wb-danger:hover {
  background: #a5301f;
  color: #fff;
  transform: translateY(1px);
  box-shadow: 0 2px 0 #8e2c20;
}

.msg-edit-button {
  background: var(--blue);
  color: white;
  margin-top: 4px;
  display: inline-block;
  padding-top: 5px;
  padding-bottom: 5px;
  padding-left: 8px;
  padding-right: 8px;
}

/* ============================================================
   MOBILE RESPONSIVE SPLIT-VIEW (m2.php)
   ============================================================ */

/* 1. Default Mobile View (< 768px): Show Conversation List, Hide Detail Thread */
@media (max-width: 767.98px) {

  /* Hide the right-hand thread pane and header title by default */
  #detailconvothread,
  .conv-header .d-none.d-md-block {
    display: none !important;
  }

  /* Full-width conversation list */
  #messageslist {
    display: block !important;
    width: 100% !important;
  }

  /* 2. Active Thread State: Triggered when user selects a conversation */
  .app-shell.mobile-thread-active #messageslist {
    display: none !important;
  }

  .app-shell.mobile-thread-active #detailconvothread {
    display: block !important;
    width: 100% !important;
  }

  /* Reveal top thread header and hide search input on active thread */
  .app-shell.mobile-thread-active .conv-header .d-none.d-md-block {
    display: flex !important;
    width: 100% !important;
  }

  .app-shell.mobile-thread-active .conv-search {
    display: none !important;
  }

  /* Ensure back arrow button is visible in header */
  .thread-back-btn {
    display: inline-block !important;
  }
}

/* 3. Desktop View (>= 768px): Restore side-by-side layout & hide mobile back button */
@media (min-width: 768px) {

  #messageslist,
  #detailconvothread {
    display: block !important;
  }

  .thread-back-btn {
    display: none !important;
  }

}

.unread_dot {
  margin-right: 8px;
}

.card-footer {
  position: sticky;
  bottom: 0;
  background-color: #fff;
  z-index: 10;
}

/* Base card style */
.message-card {
  position: relative;
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 16px;
  background-color: #f1f5f9; /* Default light gray for received messages */
  color: #1e293b;
}

/* Common style for the triangular tail */
.message-card::before {
  content: "";
  position: absolute;
  top: 0;
  width: 0;
  height: 0;
  border: 10px solid transparent;
}

/* 1. Received Message (From Other Person) - Tail on Top-Left */
.message-card.received {
  background-color: #e0e7ff; /* Light neutral/gray f1f5f9 */
  border-top-left-radius: 0;   /* Flatten corner where tail attaches */
}

.message-card.received::before {
  left: -10px;
  border-top-color: #e0e7ff;  /* Matches card background */
  border-right-color: #e0e7ff;
}

/* 2. Sent Message (From User) - Tail on Top-Right */
.message-card.sent {
  background-color: #e0e7ff; /* Faint blue/purple accent fill e0e7ff */
  border-top-right-radius: 0;  /* Flatten corner where tail attaches */
}

.message-card.sent::before {
  right: -10px;
  border-top-color: #e0e7ff;  /* Matches card background */
  border-left-color: #e0e7ff;
}