/* NeoNest Emergency Web — shared styles
 *
 * Warm cream/sage/amber palette matching the app's earth-mode safety
 * stack (deliberately NOT the cosmic palette). System font stack so we
 * don't pull in any web fonts — emergency users on bad connections need
 * sub-1-second TTI.
 *
 * Mobile-first because that's where this lands — someone googling at
 * 3am with a pup in distress is on their phone, not a desktop.
 */

:root {
  --bg-top: #F7F3EC;
  --bg-bottom: #E8DFD0;
  --ink: #3A2F26;
  --ink-soft: #6E5F52;
  --accent: #B8956A;
  --accent-strong: #8B6F4D;
  --sage: #8FA58C;
  --amber: #D4A853;
  --danger: #B85450;
  --danger-strong: #8B3A37;
  --card: rgba(255, 255, 255, 0.7);
  --card-strong: rgba(255, 255, 255, 0.92);
  --shadow: 0 2px 14px rgba(58, 47, 38, 0.08);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  -webkit-tap-highlight-color: transparent;
  text-size-adjust: 100%;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto,
    'Helvetica Neue', Arial, sans-serif;
  background: linear-gradient(180deg, var(--bg-top) 0%, var(--bg-bottom) 100%);
  background-attachment: fixed;
  min-height: 100vh;
  color: var(--ink);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

main {
  max-width: 720px;
  margin: 0 auto;
  padding: 16px;
}

/* ── Type ────────────────────────────────────────────────── */

h1 {
  font-size: 32px;
  font-weight: 300;
  letter-spacing: -0.5px;
  color: var(--ink);
  margin-bottom: 12px;
}

h2 {
  font-size: 24px;
  font-weight: 400;
  letter-spacing: -0.3px;
  color: var(--ink);
  margin-bottom: 12px;
  text-align: center;
}

h3 {
  font-size: 18px;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 6px;
}

p {
  font-size: 15.5px;
  color: var(--ink-soft);
  margin-bottom: 14px;
  line-height: 1.6;
}

p.lead {
  color: var(--ink);
  font-size: 16px;
  font-weight: 500;
}

a {
  color: var(--accent-strong);
  text-decoration: none;
}

a:hover,
a:focus {
  text-decoration: underline;
}

/* ── Buttons ─────────────────────────────────────────────── */

.btn {
  display: inline-block;
  width: 100%;
  padding: 16px 22px;
  border: 0;
  border-radius: 16px;
  background: var(--accent);
  color: #fff;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.2px;
  cursor: pointer;
  text-align: center;
  transition: transform 0.08s ease, background 0.15s ease;
  -webkit-appearance: none;
  appearance: none;
}

.btn:active {
  transform: scale(0.98);
  background: var(--accent-strong);
}

.btn-secondary {
  background: var(--card-strong);
  color: var(--ink);
  border: 1px solid rgba(58, 47, 38, 0.15);
}

.btn-secondary:active {
  background: rgba(255, 255, 255, 1);
}

.btn-danger {
  background: var(--danger);
}

.btn-danger:active {
  background: var(--danger-strong);
}

/* ── Cards ───────────────────────────────────────────────── */

.card {
  background: var(--card);
  border-radius: 16px;
  padding: 20px;
  margin-bottom: 14px;
  box-shadow: var(--shadow);
}

.card-tight {
  padding: 16px;
}

.choice-tile {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--card-strong);
  border: 0;
  border-radius: 14px;
  padding: 16px;
  width: 100%;
  cursor: pointer;
  text-align: left;
  font-family: inherit;
  font-size: 15.5px;
  color: var(--ink);
  margin-bottom: 12px;
  box-shadow: var(--shadow);
  transition: transform 0.08s ease;
}

.choice-tile:active {
  transform: scale(0.99);
}

.choice-tile .icon {
  font-size: 24px;
  flex-shrink: 0;
}

.choice-tile .icon.sage { color: var(--sage); }
.choice-tile .icon.amber { color: var(--amber); }
.choice-tile .icon.danger { color: var(--danger); }
.choice-tile .icon.accent { color: var(--accent); }

.choice-tile .body {
  flex: 1;
}

.choice-tile .arrow {
  color: var(--ink-soft);
  font-size: 18px;
  opacity: 0.5;
}

/* ── Header ──────────────────────────────────────────────── */

header.app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 8px;
  margin-bottom: 8px;
}

header.app-header .label {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.4px;
  color: rgba(58, 47, 38, 0.55);
  text-transform: uppercase;
}

header.app-header .back {
  background: none;
  border: 0;
  color: var(--ink-soft);
  font-size: 16px;
  cursor: pointer;
  padding: 8px;
}

/* ── Progress dots ───────────────────────────────────────── */

.progress {
  display: flex;
  gap: 6px;
  padding: 0 16px 16px;
}

.progress .dot {
  flex: 1;
  height: 3px;
  background: rgba(58, 47, 38, 0.08);
  border-radius: 2px;
  transition: background 0.2s ease;
}

.progress .dot.done {
  background: rgba(184, 149, 106, 0.4);
}

.progress .dot.active {
  background: var(--accent);
}

/* ── Step / card pages ───────────────────────────────────── */

.step {
  display: none;
  padding: 12px 4px 24px;
}

.step.active {
  display: block;
}

.step h2 {
  margin-top: 8px;
  margin-bottom: 14px;
}

.step .icon-hero {
  display: block;
  margin: 0 auto 18px;
  font-size: 44px;
  color: var(--accent);
  text-align: center;
}

.step .subtitle {
  text-align: center;
  font-size: 14.5px;
  color: var(--ink-soft);
  margin-bottom: 22px;
  padding: 0 12px;
}

.step .body-text {
  font-size: 15px;
  color: var(--ink-soft);
  line-height: 1.6;
  margin-bottom: 14px;
}

.step .body-text strong {
  color: var(--ink);
  font-weight: 500;
}

/* ── Soft bullet list ────────────────────────────────────── */

ul.soft-bullets {
  list-style: none;
  margin-bottom: 24px;
}

ul.soft-bullets li {
  position: relative;
  padding-left: 22px;
  margin-bottom: 12px;
  font-size: 14.5px;
  color: var(--ink);
  line-height: 1.55;
}

ul.soft-bullets li::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 9px;
  width: 6px;
  height: 6px;
  background: var(--accent);
  border-radius: 50%;
}

ul.checkpoint-list {
  list-style: none;
  margin-bottom: 18px;
}

ul.checkpoint-list li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 10px;
  font-size: 14.5px;
  color: var(--ink);
}

ul.checkpoint-list li::before {
  content: "✓";
  color: var(--sage);
  font-size: 18px;
  flex-shrink: 0;
  line-height: 1.4;
}

/* ── Yes/no row ──────────────────────────────────────────── */

.yesno {
  margin-bottom: 14px;
}

.yesno label {
  display: block;
  font-size: 14.5px;
  color: var(--ink);
  margin-bottom: 8px;
}

.yesno-buttons {
  display: flex;
  gap: 8px;
}

.yesno-btn {
  flex: 1;
  padding: 12px 8px;
  border: 0;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.55);
  color: var(--ink);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.15s ease;
}

.yesno-btn.selected {
  background: rgba(184, 149, 106, 0.18);
  color: var(--accent-strong);
  font-weight: 700;
}

/* ── Advice box ──────────────────────────────────────────── */

.advice {
  background: rgba(184, 149, 106, 0.10);
  border: 1px solid rgba(184, 149, 106, 0.25);
  border-radius: 14px;
  padding: 16px;
  margin: 14px 0 22px;
  font-size: 14.5px;
  color: var(--ink);
  line-height: 1.5;
}

.advice.empty {
  display: none;
}

/* ── Resource tile ───────────────────────────────────────── */

.resource-tile {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  background: var(--card-strong);
  border: 0;
  border-radius: 14px;
  padding: 14px;
  width: 100%;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
  margin-bottom: 12px;
  font-family: inherit;
  text-align: left;
  box-shadow: var(--shadow);
}

.resource-tile .icon-bubble {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}

.resource-tile .body h3 {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 4px;
}

.resource-tile .body p {
  font-size: 13px;
  margin-bottom: 0;
  color: var(--ink-soft);
  line-height: 1.45;
}

/* ── Footer ──────────────────────────────────────────────── */

footer {
  text-align: center;
  padding: 24px 16px 32px;
  font-size: 12px;
  color: var(--ink-soft);
  opacity: 0.7;
}

footer a {
  color: var(--ink-soft);
}

/* ── Small-screen polish ─────────────────────────────────── */

@media (max-width: 380px) {
  h1 { font-size: 26px; }
  h2 { font-size: 22px; }
  .step .icon-hero { font-size: 38px; }
}

/* ── Bereavement helplines (worldwide list) ──────────────── */

.bereavement-details summary::-webkit-details-marker { display: none; }
.bereavement-details summary { position: relative; }
.bereavement-details .ber-chev {
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%) rotate(0deg);
  transition: transform 0.18s ease;
  color: var(--ink-soft);
  font-size: 14px;
}
.bereavement-details[open] .ber-chev { transform: translateY(-50%) rotate(180deg); }

.ber-list {
  background: var(--card);
  border-radius: 16px;
  padding: 6px 10px 10px;
  margin: -6px 0 12px;
  box-shadow: var(--shadow);
}

.ber-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 10px;
  border-bottom: 1px solid rgba(58, 47, 38, 0.06);
  text-decoration: none;
  color: var(--ink);
}
.ber-row:last-of-type { border-bottom: 0; }
.ber-row:hover { text-decoration: none; background: rgba(255, 255, 255, 0.4); border-radius: 8px; }
.ber-row .flag { font-size: 22px; flex-shrink: 0; }
.ber-row strong { display: block; font-size: 14.5px; color: var(--ink); margin-bottom: 2px; }
.ber-row small { font-size: 12.5px; color: var(--ink-soft); display: block; line-height: 1.4; }

.ber-elsewhere {
  margin-top: 12px;
  padding: 12px 14px;
  background: rgba(143, 165, 140, 0.12); /* sage tint */
  border-left: 3px solid var(--sage);
  border-radius: 8px;
  font-size: 13px;
  color: var(--ink);
  line-height: 1.5;
}
.ber-elsewhere strong { display: block; margin-bottom: 4px; color: var(--ink); }
.ber-elsewhere a { color: var(--accent-strong); font-weight: 600; }

/* ── Language switcher (Google Translate widget shell) ───── */

/* Hide Google's injected top banner — it pushes the page down. */
body { top: 0 !important; }
.skiptranslate, .goog-te-banner-frame { display: none !important; }
font[style] { background: transparent !important; box-shadow: none !important; }

.lang-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 16px 4px;
  font-size: 12.5px;
  color: var(--ink-soft);
}
.lang-bar .lang-icon { font-size: 14px; }
.lang-bar #google_translate_element { display: inline-block; }
.lang-bar .goog-te-gadget { font-family: inherit !important; font-size: 12.5px !important; color: var(--ink-soft) !important; }
.lang-bar .goog-te-gadget-simple {
  background: var(--card-strong) !important;
  border: 1px solid rgba(58, 47, 38, 0.12) !important;
  border-radius: 999px !important;
  padding: 4px 12px !important;
  font-size: 12.5px !important;
  font-family: inherit !important;
}
.lang-bar .goog-te-gadget-simple .goog-te-menu-value { color: var(--ink) !important; }
.lang-bar .goog-te-gadget-simple .goog-te-menu-value span { color: var(--ink) !important; }
.lang-bar .goog-te-gadget-icon { display: none !important; }
.lang-bar .goog-te-gadget img { display: none !important; }

.lang-note {
  text-align: center;
  font-size: 11px;
  color: var(--ink-soft);
  opacity: 0.75;
  padding: 0 16px 6px;
  line-height: 1.4;
}
