/* ============================================================
   InsideCell design system
   Warm, calm, accessible. Built for emotional safety.
   ============================================================ */

:root {
  /* Core palette */
  --cream-50:  #fdf9f4;
  --cream-100: #f8efe4;
  --cream-200: #efe1cf;

  --ink-900: #2a1e1b;
  --ink-700: #4b3a35;
  --ink-500: #7a6962;
  --ink-300: #b9a89f;

  /* Sickle-cell-awareness rose, softened */
  --rose-50:  #fff1f2;
  --rose-100: #ffe0e3;
  --rose-300: #f7a8ae;
  --rose-500: #d04a5a;
  --rose-600: #b63747;
  --rose-700: #8f2634;

  /* Supporting accents */
  --amber-100: #fdf1d6;
  --amber-500: #d99a3e;
  --amber-700: #8a5a17;

  --sage-100: #e4efe4;
  --sage-500: #6fa06f;
  --sage-700: #3f6b47;

  --ocean-100: #dbe9f1;
  --ocean-500: #3d7a9a;
  --ocean-700: #22556f;

  --violet-100: #ecdff3;
  --violet-500: #8a5aa6;
  --violet-700: #543672;

  --ember-100: #fbe1d6;
  --ember-500: #d9622e;
  --ember-700: #8c3812;

  /* Surfaces */
  --bg:          var(--cream-50);
  --surface:     #ffffff;
  --surface-alt: var(--cream-100);
  --border:      #eadfd3;
  --border-soft: #f2e9de;

  /* Type */
  --font-sans: "Inter", system-ui, -apple-system, Segoe UI, Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-serif: "Fraunces", "Source Serif Pro", Georgia, "Times New Roman", serif;

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 22px;
  --radius-xl: 32px;

  --shadow-sm: 0 1px 2px rgba(42,30,27,0.06);
  --shadow-md: 0 8px 24px -12px rgba(42,30,27,0.18);
  --shadow-lg: 0 30px 60px -30px rgba(42,30,27,0.25);

  --container: 1160px;
  --container-narrow: 780px;
}

/* -------------------- Reset-ish -------------------- */

*,
*::before,
*::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  color: var(--ink-900);
  background: var(--bg);
  line-height: 1.65;
  font-size: 19px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
@media (max-width: 600px) {
  body { font-size: 18px; }
}

img { max-width: 100%; display: block; }

a {
  color: var(--rose-600);
  text-decoration: none;
  text-underline-offset: 3px;
  transition: color .15s ease;
}
a:hover { color: var(--rose-700); text-decoration: underline; }

h1, h2, h3, h4 {
  font-family: var(--font-serif);
  font-weight: 600;
  color: var(--ink-900);
  line-height: 1.2;
  letter-spacing: -0.01em;
  margin: 0 0 .5em;
}
h1 { font-size: clamp(2.1rem, 3vw + 1rem, 3.4rem); font-weight: 500; letter-spacing: -0.02em; }
h2 { font-size: clamp(1.9rem, 2vw + 1rem, 2.6rem); font-weight: 500; }
h3 { font-size: 1.45rem; }
h4 { font-size: 1.2rem; }

p { margin: 0 0 1em; }

small, .muted { color: var(--ink-500); }

hr {
  border: 0;
  border-top: 1px solid var(--border-soft);
  margin: 2rem 0;
}

/* -------------------- Layout -------------------- */

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 1.25rem;
}
.container--narrow { max-width: var(--container-narrow); }

.section { padding: 4rem 0; }
.section--lg { padding: 6rem 0; }
.section--sm { padding: 2.5rem 0; }

.grid { display: grid; gap: 1.25rem; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 820px) {
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
}

.stack > * + * { margin-top: 1rem; }
.stack-lg > * + * { margin-top: 1.5rem; }
.stack-sm > * + * { margin-top: .5rem; }

.row { display: flex; gap: .75rem; align-items: center; flex-wrap: wrap; }
.row-between { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; }

.text-center { text-align: center; }
.muted { color: var(--ink-500); }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

/* -------------------- Header / Nav -------------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(253, 249, 244, 0.85);
  backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid var(--border-soft);
}

.nav {
  display: flex;
  align-items: center;
  gap: 1.75rem;
  padding: 1rem 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  font-family: var(--font-serif);
  font-size: 1.55rem;
  font-weight: 500;
  color: var(--ink-900);
  letter-spacing: -0.01em;
}
.brand:hover { text-decoration: none; color: var(--ink-900); }

.brand-mark {
  display: inline-grid;
  place-items: center;
  width: 38px; height: 38px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--rose-500), var(--ember-500));
  color: #fff;
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: 1.1rem;
  box-shadow: var(--shadow-sm);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  margin-left: auto;
  flex-wrap: wrap;
}
.nav-links a:not(.btn) {
  color: var(--ink-700);
  font-weight: 600;
  font-size: 1.2rem;
  padding: .45rem 0;
  border-bottom: 2px solid transparent;
}
.nav-links a:not(.btn):hover {
  color: var(--ink-900);
  text-decoration: none;
  border-bottom-color: var(--rose-300);
}
.nav-links a:not(.btn).is-active {
  color: var(--ink-900);
  border-bottom-color: var(--rose-500);
}

.nav-toggle {
  display: none;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: .45rem .65rem;
  font-size: 1.1rem;
  color: var(--ink-700);
  cursor: pointer;
  margin-left: auto;
}

@media (max-width: 820px) {
  .nav-toggle { display: inline-flex; }
  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0; right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--surface);
    border-bottom: 1px solid var(--border-soft);
    padding: .5rem 1.25rem 1rem;
    box-shadow: var(--shadow-md);
  }
  .nav-links a:not(.btn) { padding: .75rem 0; border-bottom: 1px solid var(--border-soft); }
  .nav-links a:not(.btn):last-child { border-bottom: 0; }
  .nav.is-open .nav-links { display: flex; }
}

/* -------------------- Buttons -------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  padding: .85rem 1.35rem;
  font-family: var(--font-sans);
  font-size: 1.05rem;
  font-weight: 600;
  border-radius: 999px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform .06s ease, box-shadow .15s ease, background .15s ease, color .15s ease, border-color .15s ease;
  line-height: 1;
  text-decoration: none;
}
.btn:active { transform: translateY(1px); }
.btn:focus-visible {
  outline: 2px solid var(--rose-500);
  outline-offset: 2px;
}

.btn-primary {
  background: var(--rose-600);
  color: #fff;
  box-shadow: 0 6px 16px -8px rgba(182,55,71,0.65);
}
.btn-primary:hover { background: var(--rose-700); color: #fff; text-decoration: none; }

.btn-secondary {
  background: var(--surface);
  color: var(--ink-900);
  border-color: var(--border);
}
.btn-secondary:hover { background: var(--cream-100); text-decoration: none; color: var(--ink-900); }

.btn-ghost {
  background: transparent;
  color: var(--ink-700);
}
.btn-ghost:hover { background: var(--cream-100); color: var(--ink-900); text-decoration: none; }

.btn-sm { padding: .55rem 1rem; font-size: 0.98rem; }
.btn-lg { padding: 1.05rem 1.7rem; font-size: 1.15rem; }

.btn-block { width: 100%; }

/* -------------------- Cards / Surfaces -------------------- */

.card {
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.card-link:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--border);
  text-decoration: none;
}

.card-muted {
  background: var(--surface-alt);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
}

.panel {
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: var(--shadow-sm);
}

/* -------------------- Hero -------------------- */

.hero {
  position: relative;
  padding: 1.5rem 0 4rem;
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute; inset: -40% -10% auto auto;
  width: 70vw; height: 70vw;
  background: radial-gradient(closest-side, rgba(247,168,174,0.45), transparent 70%);
  z-index: 0;
  pointer-events: none;
}
.hero::after {
  content: "";
  position: absolute; inset: auto auto -40% -20%;
  width: 60vw; height: 60vw;
  background: radial-gradient(closest-side, rgba(217,154,62,0.28), transparent 70%);
  z-index: 0;
  pointer-events: none;
}
.hero .container { position: relative; z-index: 1; }

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .55rem 1.15rem;
  border-radius: 999px;
  background: var(--rose-100);
  color: var(--rose-700);
  font-size: 1.2rem;
  font-weight: 600;
  letter-spacing: 0.03em;
}

.hero-title {
  max-width: 18ch;
  margin-top: 1.25rem;
}
.hero-title em {
  font-style: italic;
  color: var(--rose-600);
  font-family: var(--font-serif);
}

.hero-lead {
  max-width: 52ch;
  font-size: 1.3rem;
  color: var(--ink-700);
  margin-top: 1rem;
  line-height: 1.6;
}

.hero-cta { margin-top: 2rem; display: flex; gap: .75rem; flex-wrap: wrap; }

.hero-proof {
  margin-top: 2.5rem;
  display: flex;
  gap: 1.25rem;
  flex-wrap: wrap;
  color: var(--ink-500);
  font-size: 1rem;
}
.hero-proof strong { color: var(--ink-900); font-weight: 600; }

/* -------------------- Section headings -------------------- */

.section-head {
  max-width: 44rem;
  margin-bottom: 2.5rem;
}
.section-head .eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--rose-600);
  margin-bottom: .5rem;
}
.section-head h2 { margin-bottom: .5rem; }
.section-head p { color: var(--ink-700); font-size: 1.2rem; line-height: 1.6; }

/* -------------------- Feature chips / values -------------------- */

.value {
  padding: 1.5rem;
  border-radius: var(--radius-lg);
  background: var(--surface);
  border: 1px solid var(--border-soft);
}
.value-icon {
  width: 42px; height: 42px;
  border-radius: 12px;
  display: grid; place-items: center;
  font-family: var(--font-serif);
  font-size: 1.2rem;
  margin-bottom: 1rem;
  background: var(--rose-100);
  color: var(--rose-700);
}
.value-rose   .value-icon { background: var(--rose-100);   color: var(--rose-700); }
.value-amber  .value-icon { background: var(--amber-100);  color: var(--amber-700); }
.value-sage   .value-icon { background: var(--sage-100);   color: var(--sage-700); }
.value-ocean  .value-icon { background: var(--ocean-100);  color: var(--ocean-700); }
.value-violet .value-icon { background: var(--violet-100); color: var(--violet-700); }
.value-ember  .value-icon { background: var(--ember-100);  color: var(--ember-700); }

.value h3 { font-family: var(--font-sans); font-size: 1.2rem; font-weight: 600; margin-bottom: .35rem; }
.value p { color: var(--ink-500); margin: 0; font-size: 1.05rem; }

/* -------------------- Avatars -------------------- */

.avatar {
  display: inline-grid;
  place-items: center;
  width: 40px; height: 40px;
  border-radius: 999px;
  background: var(--rose-100);
  color: var(--rose-700);
  font-weight: 600;
  font-size: 1rem;
  font-family: var(--font-sans);
  letter-spacing: 0.01em;
  flex: none;
}
.avatar-rose   { background: var(--rose-100);   color: var(--rose-700); }
.avatar-amber  { background: var(--amber-100);  color: var(--amber-700); }
.avatar-sage   { background: var(--sage-100);   color: var(--sage-700); }
.avatar-ocean  { background: var(--ocean-100);  color: var(--ocean-700); }
.avatar-violet { background: var(--violet-100); color: var(--violet-700); }
.avatar-ember  { background: var(--ember-100);  color: var(--ember-700); }

/* -------------------- Meta line -------------------- */

.meta {
  display: flex;
  align-items: center;
  gap: .6rem;
  color: var(--ink-500);
  font-size: 1rem;
  flex-wrap: wrap;
}
.meta .by { color: var(--ink-700); font-weight: 600; }
.meta-dot { width: 3px; height: 3px; background: var(--ink-300); border-radius: 999px; display: inline-block; }

.tag {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  padding: .25rem .65rem;
  border-radius: 999px;
  font-size: 0.88rem;
  font-weight: 600;
  background: var(--cream-100);
  color: var(--ink-700);
}
.tag-rose   { background: var(--rose-100);   color: var(--rose-700); }
.tag-amber  { background: var(--amber-100);  color: var(--amber-700); }
.tag-sage   { background: var(--sage-100);   color: var(--sage-700); }
.tag-ocean  { background: var(--ocean-100);  color: var(--ocean-700); }
.tag-violet { background: var(--violet-100); color: var(--violet-700); }
.tag-ember  { background: var(--ember-100);  color: var(--ember-700); }

/* -------------------- Forum / threads -------------------- */

.circle-card {
  display: flex;
  gap: 1rem;
  padding: 1.25rem 1.5rem;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  background: var(--surface);
  align-items: flex-start;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.circle-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--border);
  text-decoration: none;
}
.circle-icon {
  width: 44px; height: 44px;
  border-radius: 12px;
  display: grid; place-items: center;
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: 1.25rem;
  flex: none;
  background: var(--rose-100); color: var(--rose-700);
}
.circle-rose   .circle-icon { background: var(--rose-100);   color: var(--rose-700); }
.circle-amber  .circle-icon { background: var(--amber-100);  color: var(--amber-700); }
.circle-sage   .circle-icon { background: var(--sage-100);   color: var(--sage-700); }
.circle-ocean  .circle-icon { background: var(--ocean-100);  color: var(--ocean-700); }
.circle-violet .circle-icon { background: var(--violet-100); color: var(--violet-700); }
.circle-ember  .circle-icon { background: var(--ember-100);  color: var(--ember-700); }

.circle-body h3 {
  margin: 0 0 .2rem;
  font-family: var(--font-sans);
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--ink-900);
}
.circle-body p { margin: 0; color: var(--ink-500); font-size: 1.05rem; }
.circle-meta { margin-top: .5rem; font-size: 0.92rem; color: var(--ink-500); }

.thread-list {
  list-style: none;
  padding: 0;
  margin: 0;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  background: var(--surface);
  overflow: hidden;
}
.thread-item {
  display: flex;
  gap: 1rem;
  padding: 1.1rem 1.25rem;
  border-bottom: 1px solid var(--border-soft);
  align-items: flex-start;
  text-decoration: none;
  color: inherit;
  transition: background .15s ease;
}
.thread-item:last-child { border-bottom: 0; }
.thread-item:hover { background: var(--cream-50); text-decoration: none; color: inherit; }
.thread-item h3 {
  font-family: var(--font-sans);
  font-size: 1.18rem;
  font-weight: 600;
  margin: 0 0 .2rem;
  color: var(--ink-900);
}
.thread-item p { margin: 0; color: var(--ink-500); font-size: 1.02rem; }
.thread-item .meta { margin-top: .4rem; }

.pin-badge {
  display: inline-flex;
  align-items: center;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: .2rem .55rem;
  border-radius: 999px;
  background: var(--amber-100);
  color: var(--amber-700);
  margin-right: .35rem;
}

/* -------------------- Thread view -------------------- */

.post {
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  box-shadow: var(--shadow-sm);
}
.post + .post { margin-top: 1rem; }
.post-head {
  display: flex;
  align-items: center;
  gap: .75rem;
  margin-bottom: 1rem;
}
.post-head .who { display: flex; flex-direction: column; line-height: 1.2; }
.post-head .who strong { color: var(--ink-900); font-weight: 600; }
.post-head .who small { color: var(--ink-500); font-size: 0.95rem; }
.post-body p { font-size: 1.15rem; color: var(--ink-700); line-height: 1.7; }
.post-body p:last-child { margin-bottom: 0; }

.post-foot {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border-soft);
}

/* -------------------- Reactions -------------------- */

.reactions {
  display: inline-flex;
  gap: .4rem;
  flex-wrap: wrap;
  margin: 0;
}
.reaction {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  padding: .4rem .85rem;
  border-radius: 999px;
  border: 1px solid var(--border-soft);
  background: var(--surface);
  font-family: var(--font-sans);
  font-size: 1rem;
  color: var(--ink-700);
  cursor: pointer;
  transition: background .15s, border-color .15s, color .15s, transform .1s;
}
.reaction:hover { background: var(--cream-100); border-color: var(--border); }
.reaction:active { transform: scale(0.97); }
.reaction.is-active {
  background: var(--rose-50);
  border-color: var(--rose-300);
  color: var(--rose-700);
}
.reaction-symbol { font-size: 1.15rem; line-height: 1; }
.reaction-count { font-variant-numeric: tabular-nums; font-weight: 600; }

/* -------------------- Forms -------------------- */

.form .field { margin-bottom: 1.25rem; }
.form label {
  display: block;
  font-size: 1rem;
  font-weight: 600;
  color: var(--ink-700);
  margin-bottom: .4rem;
}
.form .hint { font-size: 0.95rem; color: var(--ink-500); margin-top: .35rem; }

.input, .textarea, .select {
  width: 100%;
  padding: .85rem 1rem;
  font-family: inherit;
  font-size: 1.1rem;
  color: var(--ink-900);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  transition: border-color .15s, box-shadow .15s, background .15s;
}
.input:focus, .textarea:focus, .select:focus {
  outline: none;
  border-color: var(--rose-500);
  box-shadow: 0 0 0 3px rgba(208,74,90,0.15);
}
.textarea { min-height: 140px; resize: vertical; line-height: 1.55; }
.select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--ink-500) 50%), linear-gradient(135deg, var(--ink-500) 50%, transparent 50%); background-position: calc(100% - 20px) 55%, calc(100% - 14px) 55%; background-size: 6px 6px; background-repeat: no-repeat; padding-right: 2.5rem; }

.checkbox {
  display: flex;
  align-items: flex-start;
  gap: .6rem;
  padding: .75rem .9rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface);
  cursor: pointer;
}
.checkbox input { margin-top: .2rem; }
.checkbox strong { display: block; color: var(--ink-900); font-weight: 600; font-size: 1.08rem; }
.checkbox span { color: var(--ink-500); font-size: 1rem; }

/* Role chooser (pill radio group) */
.pill-group {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
}
.pill-group input { display: none; }
.pill-group label {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  padding: .6rem 1.05rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  cursor: pointer;
  background: var(--surface);
  font-weight: 500;
  font-size: 1.02rem;
  color: var(--ink-700);
  margin-bottom: 0;
  transition: background .15s, color .15s, border-color .15s;
}
.pill-group label:hover { background: var(--cream-100); }
.pill-group input:checked + label {
  background: var(--rose-600);
  color: #fff;
  border-color: var(--rose-600);
}

/* -------------------- Flash messages -------------------- */

.flash {
  position: relative;
  padding: 1rem 2.75rem 1rem 1.2rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-soft);
  background: var(--surface);
  margin-bottom: 1rem;
  font-size: 1.05rem;
  transition: opacity .4s ease, transform .4s ease, margin .4s ease, padding .4s ease, max-height .4s ease;
  max-height: 20rem;
  overflow: hidden;
}
.flash-success { background: var(--sage-100); border-color: #c7ddc7; color: var(--sage-700); }
.flash-error   { background: var(--rose-100); border-color: #f5c7cc; color: var(--rose-700); }
.flash-info    { background: var(--ocean-100); border-color: #c0d6e1; color: var(--ocean-700); }

.flash-close {
  position: absolute;
  top: .5rem;
  right: .55rem;
  width: 1.75rem;
  height: 1.75rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 0;
  border-radius: 999px;
  font-size: 1.4rem;
  line-height: 1;
  color: inherit;
  opacity: .55;
  cursor: pointer;
}
.flash-close:hover { opacity: 1; background: rgba(0,0,0,.06); }

.flash.is-hiding {
  opacity: 0;
  transform: translateY(-4px);
  max-height: 0;
  margin-bottom: 0;
  padding-top: 0;
  padding-bottom: 0;
  border-width: 0;
}

@media (prefers-reduced-motion: reduce) {
  .flash { transition: opacity .15s ease; }
  .flash.is-hiding { transform: none; }
}

/* -------------------- Story cards -------------------- */

.story-card {
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
  display: flex;
  flex-direction: column;
  gap: .75rem;
  height: 100%;
}
.story-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: var(--border);
  text-decoration: none;
}
.story-card h3 {
  font-family: var(--font-serif);
  font-size: 1.55rem;
  font-weight: 500;
  color: var(--ink-900);
  line-height: 1.25;
  margin: 0;
}
.story-card p { color: var(--ink-700); margin: 0; font-size: 1.08rem; line-height: 1.6; }
.story-card .meta { margin-top: auto; }

/* -------------------- Article / long-form -------------------- */

.prose {
  max-width: 65ch;
}
.prose h1, .prose h2, .prose h3 { font-family: var(--font-serif); }
.prose p { font-size: 1.25rem; line-height: 1.8; color: var(--ink-700); }
.prose p:first-of-type::first-letter {
  font-family: var(--font-serif);
  font-size: 3.8rem;
  float: left;
  line-height: 1;
  margin: .15rem .5rem -.2rem 0;
  color: var(--rose-600);
  font-weight: 500;
}

/* -------------------- Footer -------------------- */

.site-footer {
  margin-top: 5rem;
  padding: 3rem 0 2rem;
  border-top: 1px solid var(--border-soft);
  background: linear-gradient(180deg, var(--cream-50), var(--cream-100));
  color: var(--ink-700);
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 2rem;
}
@media (max-width: 820px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 500px) { .footer-grid { grid-template-columns: 1fr; } }

.footer-grid h4 {
  font-family: var(--font-sans);
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--ink-500);
  margin-bottom: .75rem;
  font-weight: 700;
}
.footer-grid ul { list-style: none; padding: 0; margin: 0; }
.footer-grid li + li { margin-top: .4rem; }
.footer-grid a { color: var(--ink-700); }
.footer-grid a:hover { color: var(--ink-900); }

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border-soft);
  font-size: 0.95rem;
  color: var(--ink-500);
}

/* -------------------- Crisis banner -------------------- */

.crisis-banner {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.25rem 1.5rem;
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, var(--ember-100), var(--rose-100));
  border: 1px solid #f5c7cc;
  color: var(--ink-900);
}
.crisis-banner strong { color: var(--rose-700); }
.crisis-banner .btn { margin-left: auto; }
@media (max-width: 560px) { .crisis-banner { flex-direction: column; align-items: flex-start; } .crisis-banner .btn { margin-left: 0; } }

/* -------------------- Misc -------------------- */

.divider-soft { height: 1px; background: var(--border-soft); margin: 2rem 0; border: 0; }

.quote {
  border-left: 3px solid var(--rose-500);
  padding: .25rem 0 .25rem 1.3rem;
  font-family: var(--font-serif);
  font-size: 1.55rem;
  line-height: 1.5;
  font-style: italic;
  color: var(--ink-900);
  margin: 0;
}

::selection { background: var(--rose-100); color: var(--rose-700); }

/* ============================================================
   Admin area
   Sidebar layout, data tables, stat cards.
   ============================================================ */

.admin-shell {
  display: grid;
  grid-template-columns: 260px 1fr;
  min-height: calc(100vh - 90px);
}
@media (max-width: 900px) {
  .admin-shell { grid-template-columns: 1fr; }
}

.admin-sidebar {
  background: #1f1411;
  color: #f1dfd3;
  padding: 1.5rem 1rem;
  border-right: 1px solid #2d1f1b;
}
.admin-sidebar .brand {
  color: #fff;
  font-size: 1.4rem;
  padding: 0 .6rem 1rem;
  border-bottom: 1px solid #3a2824;
  margin-bottom: 1rem;
  width: 100%;
}
.admin-sidebar .brand:hover { color: #fff; }
.admin-nav {
  display: flex; flex-direction: column; gap: .15rem;
}
.admin-nav a {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .65rem .8rem;
  border-radius: 10px;
  color: #e6d2c4;
  font-size: 1rem;
  font-weight: 500;
  text-decoration: none;
}
.admin-nav a:hover { background: #2d1f1b; color: #fff; text-decoration: none; }
.admin-nav a.is-active { background: var(--rose-600); color: #fff; }
.admin-nav a .badge {
  margin-left: auto;
  background: rgba(255,255,255,0.12);
  color: #fff;
  font-size: 0.78rem;
  font-weight: 600;
  padding: .08rem .5rem;
  border-radius: 999px;
}
.admin-nav-group {
  text-transform: uppercase;
  letter-spacing: .12em;
  font-size: .72rem;
  color: #a58a7b;
  font-weight: 700;
  padding: 1rem .8rem .4rem;
}
.admin-sidebar-foot {
  margin-top: 2rem;
  padding: 1rem .8rem;
  border-top: 1px solid #3a2824;
  font-size: .88rem;
  color: #b89e8d;
}
.admin-sidebar-foot a { color: #ffc9b5; }

.staff-tier {
  display: inline-block;
  margin-left: .35rem;
  padding: .1rem .55rem;
  border-radius: 999px;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  vertical-align: middle;
}
.staff-tier-admin { background: #d33a2c; color: #fff; }
.staff-tier-manager { background: #7a5cf0; color: #fff; }

.admin-main {
  padding: 2rem 2.25rem;
  max-width: 100%;
  overflow-x: auto;
}
@media (max-width: 700px) {
  .admin-main { padding: 1.25rem; }
}

.admin-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 2rem;
}
.admin-head h1 {
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 1.7rem;
  letter-spacing: -0.01em;
  margin: 0;
}
.admin-head .muted { margin-top: .2rem; }

.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}
.stat-card {
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  padding: 1.25rem 1.4rem;
  box-shadow: var(--shadow-sm);
}
.stat-label {
  color: var(--ink-500);
  font-size: .9rem;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
  margin-bottom: .4rem;
}
.stat-value {
  font-family: var(--font-serif);
  font-size: 2.2rem;
  font-weight: 500;
  color: var(--ink-900);
  line-height: 1.1;
}
.stat-trend { font-size: .9rem; color: var(--ink-500); margin-top: .2rem; }

/* Data tables */
.table-wrap {
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 1rem;
}
.data-table thead th {
  background: var(--cream-100);
  color: var(--ink-700);
  text-align: left;
  font-weight: 600;
  padding: .8rem 1rem;
  font-size: .85rem;
  text-transform: uppercase;
  letter-spacing: .06em;
  border-bottom: 1px solid var(--border-soft);
  white-space: nowrap;
}
.data-table tbody td {
  padding: .95rem 1rem;
  border-bottom: 1px solid var(--border-soft);
  vertical-align: top;
}
.data-table tbody tr:last-child td { border-bottom: 0; }
.data-table tbody tr:hover { background: #fffaf3; }
.data-table .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.data-table .actions {
  display: flex; gap: .4rem; justify-content: flex-end; flex-wrap: wrap;
}
.data-table .actions form { margin: 0; display: inline; }
.data-table a.cell-link {
  color: var(--ink-900);
  font-weight: 600;
  text-decoration: none;
}
.data-table a.cell-link:hover { color: var(--rose-700); text-decoration: underline; }

.toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1.25rem;
}
.toolbar .search-form {
  display: flex; gap: .5rem; align-items: center; margin: 0;
}
.toolbar .input-sm {
  padding: .55rem .8rem;
  font-size: 1rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  min-width: 240px;
}
.toolbar .input-sm:focus {
  outline: none;
  border-color: var(--rose-500);
  box-shadow: 0 0 0 3px rgba(208,74,90,0.15);
}

.badge-role {
  display: inline-block;
  padding: .15rem .55rem;
  border-radius: 999px;
  font-size: .78rem;
  font-weight: 600;
  background: var(--cream-100);
  color: var(--ink-700);
  white-space: nowrap;
}
.badge-role.is-admin { background: var(--rose-100); color: var(--rose-700); }
.badge-role.is-manager { background: #efeaff; color: #5a3fd8; }

.badge-gender {
  display: inline-block;
  padding: .15rem .55rem;
  border-radius: 999px;
  font-size: .78rem;
  font-weight: 600;
  background: var(--cream-100);
  color: var(--ink-700);
}
.badge-gender.is-female { background: #fde7ef; color: #a6355a; }
.badge-gender.is-male   { background: #e3eefb; color: #1f4b8b; }
.badge-gender.is-undisclosed { background: var(--cream-100); color: var(--ink-500); }
.badge-role.is-warrior { background: var(--rose-100); color: var(--rose-700); }
.badge-role.is-caregiver { background: var(--sage-100); color: var(--sage-700); }
.badge-role.is-family { background: var(--amber-100); color: var(--amber-700); }
.badge-role.is-ally { background: var(--ocean-100); color: var(--ocean-700); }
.badge-role.is-medical { background: var(--violet-100); color: var(--violet-700); }

.btn-danger {
  background: #fff;
  color: var(--rose-700);
  border: 1px solid #f5c7cc;
}
.btn-danger:hover { background: var(--rose-100); color: var(--rose-700); text-decoration: none; }

.btn-icon { padding: .45rem .75rem; font-size: .9rem; }

.empty {
  padding: 3rem 1rem;
  text-align: center;
  color: var(--ink-500);
}
.empty strong { color: var(--ink-900); display: block; margin-bottom: .3rem; }

.admin-section + .admin-section { margin-top: 2.5rem; }
.admin-section h2 {
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 1.25rem;
  margin-bottom: 1rem;
  color: var(--ink-900);
}
