/* ===== Notes: the community board =====
   Loaded after content.css on /notes only. Calm on purpose: soft colour,
   generous spacing, no red until something is actually wrong. */

.notes-title { margin-top: clamp(2rem, 6vw, 4rem); }
.notes-jump { margin: 1.25rem 0 2rem; }

.board {
  max-width: 760px;
  margin-top: clamp(3.5rem, 8vw, 6rem);
  padding-top: 2.5rem;
  border-top: 1px solid var(--border-subtle);
  scroll-margin-top: 1rem;
}
.board__kicker {
  margin: 0 0 .3rem; font: .75rem var(--font-mono);
  letter-spacing: .1em; text-transform: uppercase; color: var(--text-muted);
}
.board__title { font-size: clamp(1.6rem, 3.4vw, 2.2rem); line-height: 1.2; letter-spacing: -.02em; }

/* ---------- shared form bits ---------- */
.board label { display: block; font: .8rem var(--font-mono); color: var(--text-muted); margin-bottom: .3rem; }
.board input:not([type="checkbox"]), .board select, .board textarea {
  width: 100%; font: .95rem var(--font-sans); padding: .6rem .8rem; height: auto;
  border: 1px solid var(--border-subtle); border-radius: 8px;
  background: var(--canvas-background); color: var(--text-primary);
}
.board textarea { resize: vertical; min-height: 6rem; line-height: 1.5; }
.board .check { display: flex; align-items: center; gap: .55rem; margin: .4rem 0 1rem; }
.board .check label { margin: 0; font: .9rem var(--font-sans); color: var(--text-primary); }
.board input[type="checkbox"] { width: 1.05rem; height: 1.05rem; accent-color: var(--accent-brand); margin: 0; }
.field { margin-bottom: 1rem; }
.field .fine { margin: .3rem 0 0; text-align: right; }
.form-error { color: var(--status-danger); font-size: .9rem; min-height: 1.3em; margin: .6rem 0 0; }
.linkish {
  background: none; border: 0; padding: 0; font: inherit; cursor: pointer;
  color: var(--accent-interactive); text-decoration: underline; text-underline-offset: .2em;
}
.linkish:hover { color: var(--accent-primary); }
.linkish.quiet { font-size: .82rem; color: var(--text-muted); }
.linkish.danger:hover { color: var(--status-danger); }
.linkish[disabled] { cursor: default; text-decoration: none; }

/* ---------- care card ---------- */
.care {
  margin: 1.5rem 0; padding: 1rem 1.2rem;
  background: var(--surface-card); border: 1px solid var(--border-subtle);
  border-left: 4px solid var(--status-ok); border-radius: var(--radius);
}
.care summary { cursor: pointer; font-weight: 600; }
.care ul { margin: .9rem 0 .6rem; padding-left: 1.2rem; }
.care li { margin-bottom: .45rem; }
.care .fine { margin: .8rem 0 0; }

/* ---------- breather ---------- */
.breather { margin: 0 0 1.75rem; }
.breather__panel {
  display: grid; justify-items: center; gap: 1rem; margin-top: 1rem; padding: 2rem 1rem;
  background: var(--surface-card); border: 1px solid var(--border-subtle); border-radius: var(--radius);
  text-align: center;
}
.breather__panel[hidden] { display: none; }
.breather__orb {
  width: 7rem; height: 7rem; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%,
    color-mix(in srgb, var(--accent-interactive) 55%, white), var(--accent-interactive));
  box-shadow: 0 0 40px color-mix(in srgb, var(--accent-interactive) 45%, transparent);
  transform: scale(.55);
}
/* The orb only animates for people who have not asked for less motion; the
   words alone carry the exercise for everyone else. */
.motion .breather__orb { transition: transform 4s ease-in-out; }
.motion .breather__orb.is-in { transform: scale(1.25); }
.motion .breather__orb.is-out { transform: scale(.55); }
.breather__text { margin: 0; font-size: 1.15rem; min-height: 1.6em; }

/* ---------- filter chips ---------- */
.board__bar { margin-bottom: 1.25rem; }
.chips { display: flex; flex-wrap: wrap; gap: .5rem; }
.chip {
  font: 600 .85rem var(--font-sans); padding: .4rem .85rem; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--border-subtle); background: var(--surface-card); color: var(--text-primary);
  transition: transform .2s var(--spring, ease), background-color .2s ease, border-color .2s ease;
}
.chip:hover { transform: translateY(-2px); border-color: var(--accent-brand); }
.chip.is-on { background: var(--accent-brand); border-color: var(--accent-brand); color: var(--on-accent); }
:root[data-theme="light"] .chip.is-on { background: #C2410C; border-color: #C2410C; color: #fff; }

/* ---------- composer / sign in ---------- */
.composer-card {
  margin-bottom: 2rem; padding: 1.4rem;
  background: var(--surface-card); border: 1px solid var(--border-subtle); border-radius: var(--radius);
  scroll-margin-top: 1rem;
}
.composer-card h3 { font-size: 1.15rem; }
.auth-grid { display: grid; gap: 1.5rem; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); margin: 1rem 0; }
.auth-form { display: grid; gap: .35rem; align-content: start; }
.auth-form h3 { margin-bottom: .4rem; }
.auth-form .btn { margin-top: .6rem; }
.who-line { font: .85rem var(--font-mono); color: var(--text-muted); }

/* ---------- feed ---------- */
.feed { list-style: none; padding: 0; margin: 0 0 1.5rem; display: grid; gap: 1.25rem; }
.feed-empty, .feed-loading { color: var(--text-muted); font-style: italic; }

.post {
  padding: 1.3rem 1.4rem;
  background: var(--surface-card); border: 1px solid var(--border-subtle);
  border-left: 4px solid var(--cat, var(--border-subtle)); border-radius: var(--radius);
}
.post[data-cat="rough-day"]  { --cat: var(--thermal-amber); }
.post[data-cat="experience"] { --cat: var(--tenno-cobalt); }
.post[data-cat="suggestion"] { --cat: var(--orokin-gold); }
.post[data-cat="win"]        { --cat: var(--helminth-green); }
.post[data-cat="question"]   { --cat: var(--accent-primary); }
.post--pinned { border-color: var(--accent-brand); }

.post__top { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: .6rem; }
.badge {
  font: .72rem var(--font-mono); letter-spacing: .04em; padding: .1rem .55rem; border-radius: 999px;
  border: 1px solid var(--cat, var(--border-subtle)); color: var(--text-primary);
}
.badge--pin { border-color: var(--accent-brand); }
.post__title { font-size: 1.25rem; line-height: 1.3; margin-bottom: .3rem; }
.post__meta, .comment__meta { font-size: .85rem; color: var(--text-muted); margin-bottom: .8rem; }
.post__author { font-weight: 600; color: var(--text-primary); }
.post__mod { color: var(--status-warn); }
.post__body, .comment__body { white-space: pre-wrap; overflow-wrap: anywhere; margin-bottom: 1rem; }
.flagged {
  padding: .7rem .9rem; margin: 0 0 1rem; color: var(--text-muted); font-style: italic;
  border: 1px dashed var(--border-subtle); border-radius: 8px;
}

.cw { margin-bottom: 1rem; border: 1px solid var(--border-subtle); border-radius: 8px; background: var(--canvas-background); }
.cw summary { cursor: pointer; padding: .7rem .9rem; font-weight: 600; }
.cw .post__body { padding: 0 .9rem; margin-bottom: .9rem; }

.post__foot { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1rem; }
.post__tools { display: flex; gap: .9rem; margin-left: auto; }
.reacts { display: flex; flex-wrap: wrap; gap: .4rem; }
.react {
  display: inline-flex; align-items: center; gap: .35rem; cursor: pointer;
  font: .82rem var(--font-sans); padding: .3rem .7rem; border-radius: 999px;
  border: 1px solid var(--border-subtle); background: var(--canvas-background); color: var(--text-primary);
  transition: transform .2s var(--spring, ease), background-color .2s ease, border-color .2s ease;
}
.react:hover { transform: translateY(-2px); border-color: var(--accent-brand); }
.react:active { transform: scale(.94); }
.react.is-on {
  border-color: var(--accent-brand);
  background: color-mix(in srgb, var(--accent-brand) 16%, var(--canvas-background));
}
.motion .react.is-on .react__icon { animation: pop .45s var(--spring, ease); }
.react__n { font-family: var(--font-mono); color: var(--text-muted); min-width: .6rem; }
.replies { font-size: .9rem; }

/* ---------- thread ---------- */
.thread { margin-top: 1.1rem; padding-top: 1rem; border-top: 1px solid var(--border-subtle); }
.thread[hidden] { display: none; }
.comments { list-style: none; padding: 0; margin: 0 0 1rem; display: grid; gap: .9rem; }
.comment { padding-left: .9rem; border-left: 2px solid var(--border-subtle); }
.comment .comment__meta { margin-bottom: .25rem; }
.comment .comment__body { margin-bottom: .3rem; }
.comment--gone { color: var(--text-muted); font-style: italic; }
.comment__tools { display: flex; gap: .9rem; margin: 0; }
.reply-form { display: grid; gap: .5rem; }
.reply-form .check { margin: 0; }

@media (max-width: 640px) {
  .post { padding: 1.1rem 1rem; }
  .post__tools { margin-left: 0; }
  .react__label { display: none; }
  .react__n:empty { display: none; }
}

/* ---------- Icons on the board ----------
   Every glyph here is an inline SVG from the i-* partials, so the rows need
   flex alignment rather than relying on a font's own baseline. */
.badge, .chip, .breather__open, .replies, .linkish.quiet, .react {
  display: inline-flex; align-items: center; gap: .4rem;
}
.badge .icon, .chip .icon { width: 1rem; height: 1rem; vertical-align: 0; }
.react__icon { display: inline-flex; }
.react__icon .icon { width: 1.05rem; height: 1.05rem; vertical-align: 0; }
.linkish.quiet .icon { width: .95rem; height: .95rem; vertical-align: 0; }
.replies .icon { width: 1rem; height: 1rem; vertical-align: 0; }
.breather__open .icon { width: 1.1rem; height: 1.1rem; vertical-align: 0; }
.post__tools { align-items: center; }
/* A filled heart reads as "I reacted", an outline as "I have not". */
.react.is-on .icon { fill: currentColor; fill-opacity: .18; }
.post__foot { row-gap: .6rem; }
