/* ==========================================================================
   Mutual Aid — Regenerative Technology Project
   Tokens lifted directly from assess.regentech.co so this sits alongside the
   assessment tool as part of one family.
   Gives take the amber from the regenerative spectrum, asks take brand teal,
   fulfilled takes the spectrum green.
   ========================================================================== */

:root {
  --cream:       #f6f3ec;
  --white:       #ffffff;
  --text:        #1a2c2c;
  --mid:         #3d5c5c;
  --light:       #7a9a9a;
  --border:      rgba(26,110,114,0.13);

  --teal:        #1a6e72;
  --teal-mid:    #1d8f8f;
  --teal-bright: #1fc7a8;
  --deep:        #2D1447;

  --give:        #c96b28;
  --give-wash:   #fbf1e8;
  --ask:         #1a6e72;
  --ask-wash:    #e8f4f4;
  --done:        #2a9456;
  --done-wash:   #e6f3ec;

  --display: 'Julius Sans One', sans-serif;
  --body:    'Assistant', Arial, sans-serif;

  --r: 6px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--cream);
  color: var(--text);
  font-family: var(--body);
  font-weight: 400;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--teal); text-underline-offset: 3px; }
a:hover { color: var(--teal-mid); }
:focus-visible { outline: 2px solid var(--teal-bright); outline-offset: 2px; }

/* ---------- header ---------- */

.bar {
  display: flex; align-items: center; justify-content: space-between;
  gap: 24px; flex-wrap: wrap;
  padding: 16px 28px;
  background: var(--white);
  border-bottom: 1px solid var(--border);
}

.brand { display: flex; align-items: center; gap: 14px; text-decoration: none; }
.brand-logo { height: 42px; width: auto; display: block; }

.brand-text strong {
  display: block;
  font-family: var(--display);
  font-weight: 400;
  font-size: 17px;
  letter-spacing: .02em;
  color: var(--teal);
  line-height: 1.2;
}
.brand-text em {
  display: block;
  font-style: normal;
  font-size: 12px;
  font-weight: 300;
  color: var(--light);
}

.nav { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; font-size: 15px; }
.nav a { text-decoration: none; color: var(--mid); font-weight: 600; }
.nav a:hover { color: var(--teal); }
.nav .quiet { color: var(--light); font-weight: 400; }
/* Nav link colour must not override button text colour. */
.nav a.btn-give, .nav a.btn-ask, .nav a.btn-done { color: #fff; }
.nav a.btn-plain { color: var(--mid); }

.dot {
  display: inline-block; min-width: 18px; padding: 0 5px;
  background: var(--teal-bright); color: var(--text);
  font-size: 11px; font-weight: 600; text-align: center;
  border-radius: 9px;
}

/* ---------- buttons ---------- */

.btn {
  display: inline-block;
  padding: 8px 16px;
  border: 1px solid transparent;
  border-radius: var(--r);
  font-family: var(--body);
  font-weight: 600; font-size: 14px;
  text-decoration: none !important;
  cursor: pointer;
  transition: background .12s ease, box-shadow .12s ease;
}
.btn-give  { background: var(--give);  color: #fff; }
.btn-give:hover  { background: #b45c1f; color: #fff; }
.btn-ask   { background: var(--teal);  color: #fff; }
.btn-ask:hover   { background: var(--teal-mid); color: #fff; }
.btn-done  { background: var(--done);  color: #fff; }
.btn-done:hover  { background: #237d48; color: #fff; }
.btn-plain { background: var(--white); color: var(--mid); border-color: var(--border); }
.btn-plain:hover { background: var(--ask-wash); color: var(--teal); }
.btn-lg    { padding: 12px 24px; font-size: 16px; }
.btn[disabled] { opacity: .5; pointer-events: none; }

/* ---------- layout ---------- */

.wrap { max-width: 1060px; margin: 0 auto; padding: 40px 24px 64px; }
.narrow { max-width: 640px; margin: 0 auto; }

h1 {
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(30px, 4vw, 42px);
  letter-spacing: .01em;
  line-height: 1.15;
  color: var(--teal);
  margin: 0 0 10px;
}
h2 {
  font-family: var(--display);
  font-weight: 400;
  font-size: 24px;
  letter-spacing: .01em;
  color: var(--teal);
  margin: 36px 0 14px;
}
.lede { color: var(--mid); font-weight: 300; margin: 0 0 28px; max-width: 64ch; }

.eyebrow {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .14em;
  color: var(--light);
  margin: 0 0 8px;
}
.eyebrow a { color: var(--light); text-decoration: none; }
.eyebrow a:hover { color: var(--teal); }

.flash {
  border-left: 3px solid var(--done);
  background: var(--done-wash);
  padding: 12px 16px;
  border-radius: var(--r);
  font-size: 15px;
  margin: 0 0 24px;
}
.error {
  border-left: 3px solid #ae3b3b;
  background: #f9ecec;
  padding: 12px 16px;
  border-radius: var(--r);
  font-size: 15px;
  margin: 0 0 18px;
}

/* ---------- filters ---------- */

.filters {
  display: flex; gap: 8px; flex-wrap: wrap;
  padding-bottom: 22px; margin-bottom: 28px;
  border-bottom: 1px solid var(--border);
}
.chip {
  font-size: 13px; font-weight: 600;
  padding: 6px 14px;
  border: 1px solid var(--border);
  border-radius: 999px;
  text-decoration: none;
  color: var(--mid);
  background: var(--white);
}
.chip:hover { border-color: var(--teal); color: var(--teal); }
.chip.on { background: var(--teal); border-color: var(--teal); color: #fff; }

/* ---------- the board ---------- */

.quilt {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(310px, 1fr));
  gap: 20px;
}

.patch {
  position: relative;
  display: flex; flex-direction: column;
  background: var(--white);
  border: 1px solid var(--border);
  border-top: 3px solid var(--light);
  border-radius: var(--r);
  padding: 20px;
  text-decoration: none;
  color: var(--text);
  transition: box-shadow .15s ease, transform .15s ease;
}
.patch:hover { box-shadow: 0 6px 18px rgba(26,110,114,.10); transform: translateY(-2px); color: var(--text); }
.patch--give { border-top-color: var(--give); }
.patch--ask  { border-top-color: var(--ask); }
.patch--done { border-top-color: var(--done); background: var(--done-wash); }
.patch--dead { opacity: .55; }

.patch-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px; margin-bottom: 14px;
}

.who { display: flex; align-items: center; gap: 10px; min-width: 0; }
.avatar {
  width: 32px; height: 32px; flex: none;
  display: grid; place-items: center;
  background: var(--ask-wash);
  color: var(--teal);
  font-size: 12px; font-weight: 600;
  border-radius: 50%;
}
.who-name { display: block; font-weight: 600; font-size: 14px; line-height: 1.3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.who-meta { display: block; font-size: 12px; font-weight: 300; line-height: 1.3; color: var(--light); }

.tag {
  font-size: 11px; font-weight: 600;
  text-transform: uppercase; letter-spacing: .1em;
  padding: 4px 10px; border-radius: 999px; flex: none;
}
.tag--give { color: var(--give); background: var(--give-wash); }
.tag--ask  { color: var(--teal); background: var(--ask-wash); }
.tag--done { color: var(--done); background: #fff; border: 1px solid var(--done); }

.patch h3 {
  font-family: var(--body);
  font-weight: 600; font-size: 19px;
  line-height: 1.3;
  margin: 0 0 14px;
  color: var(--text);
}

.lines { list-style: none; margin: 0 0 16px; padding: 0; }
.lines li {
  position: relative;
  padding: 7px 0 7px 20px;
  font-size: 15px;
  font-weight: 300;
  color: var(--mid);
  border-top: 1px solid var(--border);
}
.lines li:first-child { border-top: 0; }
.lines li::before {
  content: '';
  position: absolute; left: 2px; top: 15px;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--light);
}
.patch--give .lines li::before, .sheet--give .lines li::before { background: var(--give); }
.patch--ask  .lines li::before, .sheet--ask  .lines li::before { background: var(--teal); }
.patch--done .lines li::before { background: var(--done); }
.lines li.struck { color: var(--light); text-decoration: line-through; }

.patch-foot {
  margin-top: auto;
  display: flex; gap: 16px; flex-wrap: wrap;
  padding-top: 12px;
  border-top: 1px solid var(--border);
  font-size: 12px; font-weight: 300; color: var(--light);
}

/* ---------- detail ---------- */

.sheet {
  background: var(--white);
  border: 1px solid var(--border);
  border-top: 3px solid var(--light);
  border-radius: var(--r);
  padding: 30px;
  margin-bottom: 28px;
}
.sheet--give { border-top-color: var(--give); }
.sheet--ask  { border-top-color: var(--ask); }
.sheet--done { border-top-color: var(--done); }

.meta-row {
  display: flex; gap: 22px; flex-wrap: wrap;
  font-size: 13px; font-weight: 300; color: var(--light);
  padding: 14px 0; margin: 18px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 20px; align-items: center; }

.comment {
  border-left: 2px solid var(--border);
  padding: 4px 0 4px 18px;
  margin-bottom: 20px;
}
.comment-head { display: flex; align-items: baseline; gap: 10px; margin-bottom: 2px; }
.comment-head b { font-size: 14px; }
.comment-head span { font-size: 12px; font-weight: 300; color: var(--light); }
.comment p { margin: 0; font-size: 15px; font-weight: 300; color: var(--mid); }

/* ---------- forms ---------- */

label { display: block; font-weight: 600; font-size: 14px; margin: 20px 0 6px; color: var(--text); }
label .hint { display: block; font-weight: 300; font-size: 13px; color: var(--light); }

input[type=text], input[type=email], input[type=password], select, textarea {
  width: 100%;
  padding: 11px 13px;
  font-family: var(--body); font-size: 15px; font-weight: 400;
  color: var(--text);
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--r);
}
input:focus, select:focus, textarea:focus { border-color: var(--teal); outline: none; }
textarea { min-height: 96px; resize: vertical; }

.form-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 30px;
}
.form-card--give { border-top: 3px solid var(--give); }
.form-card--ask  { border-top: 3px solid var(--ask); }

.row { display: flex; gap: 18px; flex-wrap: wrap; }
.row > * { flex: 1 1 200px; }

.submit-row { margin-top: 28px; padding-top: 22px; border-top: 1px solid var(--border); display: flex; gap: 14px; align-items: center; }

/* ---------- messages ---------- */

.thread-list { list-style: none; padding: 0; margin: 0; }
.thread-list li { border-bottom: 1px solid var(--border); }
.thread-list a { display: flex; align-items: center; gap: 14px; padding: 18px 6px; text-decoration: none; color: var(--text); }
.thread-list a:hover { background: var(--white); }
.thread-snip { color: var(--light); font-size: 14px; font-weight: 300; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.bubble {
  max-width: 78%;
  padding: 12px 16px;
  margin-bottom: 12px;
  border: 1px solid var(--border);
  border-radius: var(--r);
  background: var(--white);
  font-size: 15px;
  font-weight: 300;
}
.bubble.mine { margin-left: auto; background: var(--ask-wash); border-color: transparent; }
.bubble time { display: block; font-size: 11px; color: var(--light); margin-top: 6px; }

/* ---------- misc ---------- */

.empty {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 48px 24px;
  text-align: center;
  color: var(--light);
}
.empty h2 { margin-top: 0; }

.steps { list-style: none; counter-reset: s; padding: 0; }
.steps li {
  counter-increment: s;
  position: relative;
  padding: 0 0 26px 48px;
  border-left: 1px solid var(--border);
  margin-left: 15px;
}
.steps li:last-child { border-left-color: transparent; padding-bottom: 0; }
.steps li::before {
  content: counter(s);
  position: absolute; left: -15px; top: -2px;
  width: 30px; height: 30px;
  display: grid; place-items: center;
  background: var(--teal);
  color: #fff;
  border-radius: 50%;
  font-size: 13px; font-weight: 600;
}
.steps b { display: block; font-family: var(--display); font-weight: 400; font-size: 18px; color: var(--teal); margin-bottom: 2px; }
.steps { color: var(--mid); font-weight: 300; }

table { width: 100%; border-collapse: collapse; font-size: 14px; background: var(--white); border-radius: var(--r); overflow: hidden; }
th, td { text-align: left; padding: 11px 12px; border-bottom: 1px solid var(--border); }
th { font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--light); font-weight: 600; }

.foot {
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  max-width: 1060px; margin: 0 auto;
  padding: 24px;
  border-top: 1px solid var(--border);
  font-size: 13px; font-weight: 300; color: var(--light);
}

@media (max-width: 600px) {
  .bar { padding: 14px 16px; }
  .brand-logo { height: 34px; }
  .nav { gap: 14px; font-size: 14px; }
  .wrap { padding: 28px 16px 48px; }
  .quilt { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
