/* I Want Help — styles.css
   One stylesheet, no framework, no build step.
   Colours are defined once in :root and inverted for dark mode. */

:root {
  --bg:           #f5f7f9;
  --bg-raised:    #ffffff;
  --bg-sunken:    #e9eef2;
  --ink:          #16232e;
  --ink-soft:     #4a5b69;
  --ink-faint:    #6b7c8a;
  --line:         #d5dfe6;
  --line-soft:    #e4ebf0;

  --teal:         #0f6e6e;
  --teal-deep:    #0a5252;
  --teal-tint:    #e3f1f0;
  --teal-ink:     #084a4a;

  --urgent:       #a3282f;
  --urgent-deep:  #7f1d23;
  --urgent-tint:  #fbeced;

  --amber-tint:   #fdf3e0;
  --amber-line:   #e0bf7d;

  --radius:       12px;
  --radius-sm:    8px;
  --shadow:       0 1px 2px rgba(22, 35, 46, .06), 0 4px 14px rgba(22, 35, 46, .06);
  --shadow-lift:  0 2px 4px rgba(22, 35, 46, .08), 0 10px 28px rgba(22, 35, 46, .12);
  --maxw:         64rem;

  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue",
          Arial, "Noto Sans", sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg:         #11181e;
    --bg-raised:  #1a232b;
    --bg-sunken:  #0c1216;
    --ink:        #e8eef2;
    --ink-soft:   #b3c1cc;
    --ink-faint:  #8b9aa6;
    --line:       #2e3d48;
    --line-soft:  #253239;

    --teal:       #4fc3bd;
    --teal-deep:  #7ad7d1;
    --teal-tint:  #12312f;
    --teal-ink:   #a5e4e0;

    --urgent:     #ff8a90;
    --urgent-deep:#ffb3b7;
    --urgent-tint:#3a1a1d;

    --amber-tint: #33280f;
    --amber-line: #7a6127;

    --shadow:      0 1px 2px rgba(0,0,0,.4), 0 4px 14px rgba(0,0,0,.3);
    --shadow-lift: 0 2px 4px rgba(0,0,0,.45), 0 10px 28px rgba(0,0,0,.45);
  }
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg);
  overflow-wrap: break-word;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
}

/* ---------- Type ---------- */

h1, h2, h3, h4 { line-height: 1.25; margin: 0 0 .5em; font-weight: 700; letter-spacing: -.01em; }
h1 { font-size: clamp(1.75rem, 1.2rem + 2.2vw, 2.6rem); }
h2 { font-size: clamp(1.35rem, 1.1rem + 1.1vw, 1.75rem); }
h3 { font-size: 1.1875rem; }
p  { margin: 0 0 1rem; }
a  { color: var(--teal); text-decoration-thickness: .08em; text-underline-offset: .15em; }
a:hover { color: var(--teal-deep); }
strong { font-weight: 650; }

.lede { font-size: 1.125rem; color: var(--ink-soft); max-width: 44rem; }
.muted { color: var(--ink-faint); }
.small { font-size: .875rem; }

:focus-visible {
  outline: 3px solid var(--teal);
  outline-offset: 2px;
  border-radius: 4px;
}

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--teal); color: #fff; padding: .75rem 1rem; border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; }

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ---------- Layout ---------- */

.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 1.25rem; }
.wrap-narrow { max-width: 48rem; }
main { padding: 2rem 0 4rem; }

/* ---------- Crisis bar ---------- */

.crisis-bar {
  background: var(--urgent-deep);
  color: #fff;
  position: sticky; top: 0; z-index: 40;
  box-shadow: 0 1px 0 rgba(0,0,0,.25);
}
.crisis-bar .wrap {
  display: flex; flex-wrap: wrap; align-items: center; gap: .5rem .9rem;
  padding-top: .55rem; padding-bottom: .55rem;
}
.crisis-bar__label {
  font-weight: 700; font-size: .8125rem; text-transform: uppercase; letter-spacing: .06em;
  margin-right: .1rem;
}
.crisis-bar a,
.crisis-bar button {
  color: #fff; font-family: inherit; font-size: .9375rem; font-weight: 650;
  text-decoration: none; cursor: pointer;
  background: rgba(255,255,255,.14);
  border: 1px solid rgba(255,255,255,.35);
  padding: .3rem .7rem; border-radius: 999px;
  white-space: nowrap;
}
.crisis-bar a:hover,
.crisis-bar button:hover { background: rgba(255,255,255,.28); color: #fff; }
.crisis-bar .exit {
  margin-left: auto; background: transparent; font-weight: 550;
  border-color: rgba(255,255,255,.5);
}
.crisis-bar :focus-visible { outline: 3px solid #fff; outline-offset: 2px; }

/* ---------- Header / nav ---------- */

.site-header {
  background: var(--bg-raised);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; flex-wrap: wrap; padding-top: .9rem; padding-bottom: .9rem;
}
.brand { display: flex; align-items: center; gap: .65rem; text-decoration: none; color: inherit; }
.brand:hover { color: inherit; }
.brand__mark {
  width: 2.25rem; height: 2.25rem; flex: none;
  border-radius: 10px; background: var(--teal); color: #fff;
  display: grid; place-items: center; font-weight: 800; font-size: .9rem; letter-spacing: -.03em;
}
.brand__name { font-weight: 750; font-size: 1.0625rem; letter-spacing: -.015em; }
.brand__tag { display: block; font-weight: 400; font-size: .78rem; color: var(--ink-faint); letter-spacing: 0; }

.nav { display: flex; gap: .25rem; flex-wrap: wrap; }
.nav a {
  text-decoration: none; color: var(--ink-soft); font-size: .9375rem; font-weight: 550;
  padding: .4rem .7rem; border-radius: 999px;
}
.nav a:hover { background: var(--bg-sunken); color: var(--ink); }
.nav a[aria-current="page"] { background: var(--teal-tint); color: var(--teal-ink); }

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex; align-items: center; gap: .5rem;
  font: inherit; font-weight: 600; cursor: pointer;
  background: var(--teal); color: #fff; border: 1px solid transparent;
  padding: .7rem 1.15rem; border-radius: 999px; text-decoration: none;
  transition: background .15s ease, transform .15s ease;
}
.btn:hover { background: var(--teal-deep); color: #fff; }
.btn:active { transform: translateY(1px); }
.btn--ghost { background: transparent; color: var(--teal); border-color: var(--line); }
.btn--ghost:hover { background: var(--teal-tint); color: var(--teal-ink); }
.btn--urgent { background: var(--urgent-deep); }
.btn--urgent:hover { background: var(--urgent); color: #fff; }
.btn--lg { padding: .95rem 1.6rem; font-size: 1.0625rem; }
.btn--sm { padding: .45rem .85rem; font-size: .875rem; }
.btn-row { display: flex; flex-wrap: wrap; gap: .6rem; margin: 1.25rem 0; }

/* ---------- Hero ---------- */

.hero {
  background: var(--bg-raised);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: clamp(1.5rem, 1rem + 2vw, 2.5rem);
  box-shadow: var(--shadow);
  margin-bottom: 1.5rem;
}
.hero h1 { max-width: 34rem; }
.hero .lede { margin-bottom: 0; }
.hero__note {
  margin-top: 1.25rem; padding-top: 1.25rem; border-top: 1px solid var(--line-soft);
  font-size: .9375rem; color: var(--ink-faint); display: flex; gap: 1.25rem; flex-wrap: wrap;
}
.hero__note span { display: inline-flex; align-items: center; gap: .4rem; }

/* ---------- Flow card ---------- */

.flow {
  background: var(--bg-raised);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: clamp(1.25rem, 1rem + 1.5vw, 2rem);
}
.flow__crumbs {
  display: flex; flex-wrap: wrap; align-items: center; gap: .35rem;
  font-size: .8125rem; color: var(--ink-faint); margin-bottom: 1rem;
}
.flow__crumbs button {
  font: inherit; background: none; border: 0; padding: .1rem .25rem; cursor: pointer;
  color: var(--teal); text-decoration: underline; border-radius: 4px;
}
.flow__crumbs .sep { opacity: .6; }
/* The flow heading is an h2 (the page's h1 is the hero) but reads as the
   main heading of the card, so it is sized accordingly. */
.flow__q, .result__heading {
  font-size: clamp(1.5rem, 1.15rem + 1.7vw, 2.15rem);
}
.flow__q { margin-bottom: .35rem; }
.flow__sub { color: var(--ink-soft); margin-bottom: 1.5rem; }

.options { display: grid; gap: .6rem; margin: 0; padding: 0; list-style: none; }
.option {
  display: block; width: 100%; text-align: left; font: inherit; cursor: pointer;
  background: var(--bg); border: 1.5px solid var(--line); border-radius: var(--radius-sm);
  padding: .95rem 1.1rem; color: var(--ink);
  transition: border-color .14s ease, background .14s ease, transform .14s ease;
  position: relative; padding-right: 2.75rem;
}
.option:hover {
  border-color: var(--teal); background: var(--teal-tint); transform: translateX(2px);
}
.option__label { font-weight: 600; display: block; }
.option__hint { display: block; font-size: .9rem; color: var(--ink-faint); margin-top: .15rem; }
.option::after {
  content: "›"; position: absolute; right: 1.1rem; top: 50%; transform: translateY(-52%);
  font-size: 1.5rem; line-height: 1; color: var(--ink-faint); font-weight: 400;
}
.option:hover::after { color: var(--teal); }
.option--urgent { border-color: color-mix(in srgb, var(--urgent) 45%, var(--line)); }
.option--urgent:hover { border-color: var(--urgent); background: var(--urgent-tint); }
.option--urgent .option__label { color: var(--urgent-deep); }

/* ---------- Result ---------- */

.result__heading { margin-bottom: .5rem; }
.result--urgent .result__heading { color: var(--urgent-deep); }

.callout {
  border-left: 4px solid var(--teal);
  background: var(--teal-tint);
  padding: 1rem 1.15rem; border-radius: var(--radius-sm);
  margin: 1.25rem 0;
}
.callout--urgent { border-left-color: var(--urgent); background: var(--urgent-tint); }
.callout p:last-child { margin-bottom: 0; }
.callout h3 { margin-bottom: .35rem; font-size: 1.0625rem; }

.steps { list-style: none; counter-reset: step; padding: 0; margin: 1.5rem 0; display: grid; gap: .85rem; }
.steps li {
  counter-increment: step; position: relative; padding-left: 2.5rem; color: var(--ink);
}
.steps li::before {
  content: counter(step);
  position: absolute; left: 0; top: .05rem;
  width: 1.75rem; height: 1.75rem; border-radius: 50%;
  background: var(--teal); color: #fff;
  display: grid; place-items: center; font-size: .8125rem; font-weight: 700;
}
.result--urgent .steps li::before { background: var(--urgent-deep); }

.group { margin: 2rem 0 0; }
.group__title {
  font-size: .8125rem; text-transform: uppercase; letter-spacing: .07em;
  color: var(--ink-faint); font-weight: 700; margin-bottom: .75rem;
  padding-bottom: .4rem; border-bottom: 1px solid var(--line-soft);
}

/* ---------- Resource cards ---------- */

.cards { display: grid; gap: .85rem; grid-template-columns: repeat(auto-fill, minmax(19rem, 1fr)); }

.card {
  background: var(--bg-raised); border: 1px solid var(--line);
  border-radius: var(--radius-sm); padding: 1.1rem 1.15rem;
  display: flex; flex-direction: column; gap: .55rem;
  box-shadow: var(--shadow);
}
.card__name { font-weight: 680; font-size: 1.0625rem; margin: 0; line-height: 1.3; }
.card__who { font-size: .875rem; color: var(--ink-faint); margin: 0; }
.card__blurb { font-size: .9375rem; color: var(--ink-soft); margin: 0; }
.card__contact { display: flex; flex-wrap: wrap; gap: .45rem; margin-top: auto; padding-top: .35rem; }

.tel {
  display: inline-flex; align-items: center; gap: .4rem;
  background: var(--teal); color: #fff; text-decoration: none;
  font-weight: 700; font-size: 1.0625rem; letter-spacing: .01em;
  padding: .5rem .9rem; border-radius: var(--radius-sm);
  font-variant-numeric: tabular-nums;
}
.tel:hover { background: var(--teal-deep); color: #fff; }
.tel--000 { background: var(--urgent-deep); }
.tel--000:hover { background: var(--urgent); color: #fff; }

.chip {
  display: inline-flex; align-items: center; gap: .35rem;
  font-size: .875rem; font-weight: 550; text-decoration: none;
  background: var(--bg-sunken); color: var(--ink-soft);
  border: 1px solid var(--line); padding: .45rem .8rem; border-radius: var(--radius-sm);
}
.chip:hover { border-color: var(--teal); color: var(--teal-ink); background: var(--teal-tint); }

.card__hours {
  font-size: .8125rem; color: var(--ink-faint);
  display: inline-flex; align-items: center; gap: .35rem;
}
.badge {
  display: inline-block; font-size: .6875rem; font-weight: 750;
  text-transform: uppercase; letter-spacing: .05em;
  background: var(--teal-tint); color: var(--teal-ink);
  padding: .15rem .45rem; border-radius: 5px; vertical-align: 2px;
}

/* ---------- Then / next steps ---------- */

.then { margin-top: 2.25rem; padding-top: 1.5rem; border-top: 1px solid var(--line-soft); }
.then h3 { font-size: 1rem; margin-bottom: .75rem; }
.then .options { gap: .5rem; }

.result__tools {
  display: flex; flex-wrap: wrap; gap: .6rem;
  margin-top: 2rem; padding-top: 1.25rem; border-top: 1px solid var(--line-soft);
}

/* ---------- Directory (resources.html) ---------- */

.filters {
  background: var(--bg-raised); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.15rem; margin-bottom: 1.5rem; box-shadow: var(--shadow);
}
.search-field { position: relative; }
.search-field input {
  width: 100%; font: inherit; font-size: 1.0625rem;
  padding: .8rem 1rem .8rem 2.6rem;
  border: 1.5px solid var(--line); border-radius: var(--radius-sm);
  background: var(--bg); color: var(--ink);
}
.search-field input:focus { border-color: var(--teal); }
.search-field svg {
  position: absolute; left: .9rem; top: 50%; transform: translateY(-50%);
  width: 1.1rem; height: 1.1rem; color: var(--ink-faint); pointer-events: none;
}
.tagbar { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .9rem; }
.tag {
  font: inherit; font-size: .8125rem; font-weight: 550; cursor: pointer;
  background: var(--bg-sunken); color: var(--ink-soft);
  border: 1px solid var(--line); padding: .35rem .7rem; border-radius: 999px;
}
.tag:hover { border-color: var(--teal); color: var(--teal-ink); }
.tag[aria-pressed="true"] { background: var(--teal); border-color: var(--teal); color: #fff; }
.count { margin: 0 0 1rem; font-size: .9375rem; color: var(--ink-faint); }

/* ---------- Toolkit ---------- */

.tool {
  background: var(--bg-raised); border: 1px solid var(--line); border-radius: var(--radius);
  padding: clamp(1.25rem, 1rem + 1vw, 1.75rem); box-shadow: var(--shadow); margin-bottom: 1.25rem;
}
.breather { display: grid; place-items: center; gap: 1rem; padding: 1rem 0 .5rem; }
.breather__orb {
  width: 11rem; height: 11rem; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, var(--teal), var(--teal-deep));
  display: grid; place-items: center; color: #fff; font-weight: 650; font-size: 1.05rem;
  transform: scale(.55); transition: transform 4s ease-in-out;
  box-shadow: 0 0 0 1px rgba(255,255,255,.15) inset;
}
.breather__orb.is-in  { transform: scale(1); }
.breather__orb.is-hold{ transform: scale(1); }
.breather__orb.is-out { transform: scale(.55); }
.breather__count { font-variant-numeric: tabular-nums; color: var(--ink-faint); font-size: .9375rem; }

.grounding { display: grid; gap: .75rem; margin: 1.25rem 0 0; }
.grounding__step {
  border: 1.5px solid var(--line); border-radius: var(--radius-sm);
  padding: .9rem 1rem; background: var(--bg);
}
.grounding__step h3 { font-size: 1rem; margin-bottom: .5rem; }
.grounding__step input {
  width: 100%; font: inherit; padding: .55rem .7rem; margin-bottom: .4rem;
  border: 1px solid var(--line); border-radius: 6px; background: var(--bg-raised); color: var(--ink);
}
.grounding__step input:last-of-type { margin-bottom: 0; }

.timer-display {
  font-size: clamp(2.5rem, 2rem + 4vw, 4rem); font-weight: 750;
  font-variant-numeric: tabular-nums; text-align: center; color: var(--teal);
  letter-spacing: -.02em; line-height: 1.1;
}
.progress-track {
  height: .5rem; background: var(--bg-sunken); border-radius: 999px; overflow: hidden; margin: 1rem 0;
}
.progress-fill { height: 100%; width: 0; background: var(--teal); border-radius: 999px; transition: width .3s linear; }

/* ---------- Safety plan ---------- */

.plan { display: grid; gap: 1.25rem; }
.plan__section {
  background: var(--bg-raised); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.25rem; box-shadow: var(--shadow);
}
.plan__section h2 { font-size: 1.1875rem; margin-bottom: .25rem; }
.plan__section .hint { font-size: .9rem; color: var(--ink-faint); margin-bottom: .85rem; }
.plan__section textarea {
  width: 100%; font: inherit; line-height: 1.55; min-height: 6.5rem; resize: vertical;
  padding: .75rem .85rem; border: 1.5px solid var(--line); border-radius: var(--radius-sm);
  background: var(--bg); color: var(--ink);
}
.plan__section textarea:focus { border-color: var(--teal); }
.save-state { font-size: .875rem; color: var(--ink-faint); min-height: 1.4em; }

/* ---------- Notices ---------- */

.notice {
  border: 1px solid var(--amber-line); background: var(--amber-tint);
  border-radius: var(--radius-sm); padding: .9rem 1.1rem; font-size: .9375rem;
  margin: 1.25rem 0;
}
.notice p:last-child { margin-bottom: 0; }
.notice strong { font-weight: 700; }

/* ---------- Content pages ---------- */

.prose { max-width: 44rem; }
.prose h2 { margin-top: 2.25rem; }
.prose h3 { margin-top: 1.75rem; }
.prose ul, .prose ol { padding-left: 1.35rem; margin: 0 0 1rem; }
.prose li { margin-bottom: .45rem; }

/* ---------- Footer ---------- */

.site-footer {
  background: var(--bg-raised); border-top: 1px solid var(--line);
  padding: 2.5rem 0; margin-top: 3rem; font-size: .9375rem; color: var(--ink-soft);
}
.site-footer .cols {
  display: grid; gap: 2rem; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
  margin-bottom: 2rem;
}
.site-footer h2 { font-size: .8125rem; text-transform: uppercase; letter-spacing: .07em; color: var(--ink-faint); }
.site-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: .35rem; }
.site-footer .legal {
  border-top: 1px solid var(--line-soft); padding-top: 1.5rem;
  font-size: .8125rem; color: var(--ink-faint);
}

/* ---------- Print ---------- */

@media print {
  .crisis-bar, .site-header, .site-footer, .then, .result__tools,
  .filters, .btn, .skip-link, .flow__crumbs { display: none !important; }
  body { background: #fff; color: #000; font-size: 11pt; }
  .flow, .card, .plan__section, .tool { box-shadow: none; border: 1px solid #999; break-inside: avoid; }
  .cards { grid-template-columns: 1fr 1fr; }
  a { color: #000; text-decoration: none; }
  .tel { background: none !important; color: #000 !important; border: 1px solid #000; }
  .plan__section textarea { border: 1px solid #999; min-height: auto; }
}
