/* Safety today — the home hero strip + the /app/safety/ detail page.
   Tokens only (vilkax-tokens.css); severity uses the --vx-sev-* ladder so the
   light theme inherits accessible contrast. Behaviour: /app/safety-today.js. */

.st-strip {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr) auto;
  align-items: center;
  gap: 16px;
  padding: 18px 20px;
  border-radius: 18px;
  background:
    radial-gradient(120% 120% at 100% 0%, rgba(177, 76, 255, 0.12), transparent 60%),
    var(--vx-surface-1, rgba(255, 255, 255, 0.025));
  border: 1px solid var(--vx-line, rgba(255, 255, 255, 0.08));
  color: var(--vx-text, #EEF2F8);
}
.st-kicker {
  display: block;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--vx-text-muted, #9AA6BC);
}
.st-wx { display: flex; align-items: baseline; gap: 10px; min-width: 0; }
.st-temp { font-size: 34px; font-weight: 700; line-height: 1; font-variant-numeric: tabular-nums; }
.st-cond { font-size: 15px; color: var(--vx-text-muted, #9AA6BC); }
.st-muted { color: var(--vx-text-muted, #9AA6BC); font-size: 14px; }

.st-top {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
  padding: 10px 14px;
  border-radius: 12px;
  border: 1px solid var(--vx-line, rgba(255, 255, 255, 0.08));
}
.st-top-title { font-weight: 600; font-size: 15px; overflow-wrap: anywhere; }
.st-top-action { font-size: 13px; color: var(--vx-text-muted, #9AA6BC); }

.st-link,
.st-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
  border-radius: 999px;
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  color: var(--vx-text, #EEF2F8);
  background: transparent;
  border: 1px solid var(--vx-line-3, rgba(255, 255, 255, 0.20));
}
.st-btn-primary {
  color: var(--vx-on-accent, #FFFFFF);
  background: var(--vx-accent-fill, #8E3DCC);
  border-color: var(--vx-accent-fill, #8E3DCC);
}
.st-link:focus-visible,
.st-btn:focus-visible { outline: 2px solid var(--vx-accent-br, #C77DFF); outline-offset: 2px; }

.st-consent { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; grid-column: 1 / -1; }
.st-consent p { margin: 0; flex: 1 1 260px; }
.st-consent-title { font-weight: 600; display: block; }

/* Severity ladder */
.st-sev-critical { background: var(--vx-sev-critical-sf); border-color: var(--vx-sev-critical-ln); }
.st-sev-high     { background: var(--vx-sev-high-sf);     border-color: var(--vx-sev-high-ln); }
.st-sev-medium   { background: var(--vx-sev-elevated-sf); border-color: var(--vx-sev-elevated-ln); }
.st-sev-low,
.st-sev-info     { background: var(--vx-sev-low-sf);      border-color: var(--vx-sev-low-ln); }
.st-badge {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  border: 1px solid currentColor;
}
.st-badge.st-sev-critical { color: var(--vx-sev-critical); }
.st-badge.st-sev-high     { color: var(--vx-sev-high); }
.st-badge.st-sev-medium   { color: var(--vx-sev-elevated); }
.st-badge.st-sev-low,
.st-badge.st-sev-info     { color: var(--vx-sev-low); }

@media (max-width: 720px) {
  .st-strip { grid-template-columns: 1fr; }
}

/* ── Detail page ───────────────────────────────────────────── */
.st-page { max-width: 760px; margin: 0 auto; padding: 24px 16px 64px; display: flex; flex-direction: column; gap: 18px; }
.st-page h1 { margin: 0; font-size: clamp(26px, 4vw, 36px); }
.st-section {
  padding: 18px 20px;
  border-radius: 16px;
  background: var(--vx-surface-1, rgba(255, 255, 255, 0.025));
  border: 1px solid var(--vx-line, rgba(255, 255, 255, 0.08));
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.st-section h2 { margin: 0; font-size: 18px; }
.st-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.st-item { padding: 12px 14px; border-radius: 12px; border: 1px solid var(--vx-line, rgba(255, 255, 255, 0.08)); display: flex; flex-direction: column; gap: 6px; }
.st-item h3 { margin: 0; font-size: 16px; }
.st-item p { margin: 0; overflow-wrap: anywhere; }
.st-next { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 8px; list-style: none; margin: 0; padding: 0; }
.st-next li { padding: 10px; border-radius: 10px; border: 1px solid var(--vx-line, rgba(255, 255, 255, 0.08)); display: flex; flex-direction: column; gap: 2px; }
.st-attr { font-size: 12px; color: var(--vx-text-muted, #9AA6BC); }
.st-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.st-check { display: flex; align-items: center; gap: 10px; min-height: 44px; }
.st-check input { width: 20px; height: 20px; }

/* ── Living backgrounds (same rules as desktop LivingBackdrop.css) ── */
.vlx-living {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  color: #fff;
  background:
    radial-gradient(120% 90% at 100% 0%, var(--lv-glow) 0%, transparent 60%),
    radial-gradient(90% 80% at 0% 100%, var(--lv-mid) 0%, transparent 70%),
    linear-gradient(135deg, var(--lv-mid) 0%, var(--lv-base) 65%);
}
.vlx-living::before {
  content: "";
  position: absolute;
  inset: -30%;
  z-index: -1;
  background:
    radial-gradient(35% 35% at 30% 40%, color-mix(in srgb, var(--lv-glow) 45%, transparent), transparent 70%),
    radial-gradient(30% 30% at 70% 70%, color-mix(in srgb, var(--lv-mid) 60%, transparent), transparent 70%);
  filter: blur(24px);
  will-change: transform;
  animation: vlx-living-drift 24s ease-in-out infinite alternate;
  pointer-events: none;
}
.vlx-living::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  opacity: 0.09;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='140' height='140'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  pointer-events: none;
}
.vlx-living.is-static::before { animation: none; }
@keyframes vlx-living-drift {
  0%   { transform: translate3d(-4%, -3%, 0) scale(1); }
  50%  { transform: translate3d(5%, 2%, 0) scale(1.08); }
  100% { transform: translate3d(-2%, 5%, 0) scale(1.02); }
}
@media (prefers-reduced-motion: reduce) {
  .vlx-living::before { animation: none; }
  .vlx-living-glyph { animation: none !important; }
}
.vlx-living-glyph { display: inline-flex; animation: vlx-living-breathe 4s ease-in-out infinite alternate; }
@keyframes vlx-living-breathe {
  from { transform: translateY(0) scale(0.97); }
  to   { transform: translateY(-3px) scale(1.03); }
}
.vlx-living-soft { color: rgba(255, 255, 255, 0.9); }
.vlx-living a, .vlx-living button { color: inherit; }
.vlx-living :focus-visible { outline: 2px solid #fff; outline-offset: 2px; }

/* Home top: the weather box is the hero; notifications and Kin follow. */
.st-strip.vlx-living {
  grid-template-columns: minmax(0, 1fr) auto;
  padding: clamp(20px, 3vw, 28px);
  border-radius: 22px;
  border-color: rgba(255, 255, 255, 0.10);
  color: #fff;
}
.st-strip.vlx-living .st-kicker,
.st-strip.vlx-living .st-cond,
.st-strip.vlx-living .st-muted,
.st-strip.vlx-living .st-vibe { color: rgba(255, 255, 255, 0.9); }
.st-strip.vlx-living .st-link { color: #fff; }
.st-wx-row { display: flex; align-items: center; gap: clamp(14px, 3vw, 28px); flex-wrap: wrap; margin-top: 10px; }
.st-strip .st-temp { font-size: clamp(56px, 8vw, 84px); font-weight: 800; letter-spacing: -0.04em; }
.st-wx-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1 1 180px; }
.st-strip .st-cond { font-size: 17px; font-weight: 700; color: #fff; }
.st-vibe { font-size: 14px; }
.st-glyph:empty { display: none; }

.st-notifs {
  margin-top: 12px;
  padding: 10px 12px;
  border-radius: 18px;
  background: var(--vx-surface-1, rgba(255, 255, 255, 0.025));
  border: 1px solid var(--vx-line, rgba(255, 255, 255, 0.08));
  color: var(--vx-text, #EEF2F8);
}
.st-notifs-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; padding: 0 4px; }
.st-notifs-h { margin: 0; font-size: 13.5px; font-weight: 600; color: var(--vx-text-muted, #9AA6BC); }
.st-notifs-pc {
  display: inline-flex; align-items: center; min-height: 36px; padding: 4px 12px; border-radius: 999px;
  color: var(--vx-violet, #B14CFF); text-decoration: none; font-size: 13px; font-weight: 600;
  border: 1px solid color-mix(in srgb, var(--vx-violet, #B14CFF) 35%, transparent);
}
.st-notifs-list { list-style: none; margin: 4px 0 0; padding: 0; }
.st-notifs-list[hidden] { display: none; }
.st-notifs-row { border-inline-start: 3px solid var(--vx-sev-info, #6E8BFF); border-radius: 10px; margin: 4px 0; }
.st-notifs-row.st-sev-critical, .st-notifs-row.st-sev-high { border-inline-start-color: var(--vx-sev-critical, #FF5A6E); }
.st-notifs-row.st-sev-medium { border-inline-start-color: var(--vx-sev-medium, #FFB547); }
.st-notifs-link { display: flex; flex-direction: column; gap: 2px; min-height: 48px; justify-content: center; padding: 6px 12px; color: inherit; text-decoration: none; }
.st-notifs-link:hover .st-notifs-title { text-decoration: underline; }
.st-notifs-title { font-weight: 700; font-size: 14.5px; overflow-wrap: anywhere; }
.st-notifs-sub { font-size: 13px; color: var(--vx-text-muted, #9AA6BC); }
.st-notifs-empty { padding: 10px 12px; color: var(--vx-text-muted, #9AA6BC); font-size: 14px; }
.st-notifs-toggle {
  display: flex; align-items: center; gap: 12px; width: 100%; min-height: 48px; padding: 8px 12px; margin-top: 4px;
  background: transparent; border: 0; border-radius: 12px; color: inherit; font: inherit; text-align: start; cursor: pointer;
}
.st-notifs-toggle[hidden], .st-notifs-less[hidden] { display: none; }
.st-notifs-count { min-width: 26px; padding: 2px 8px; border-radius: 999px; font-weight: 800; font-size: 13px; text-align: center; background: color-mix(in srgb, var(--vx-violet, #B14CFF) 18%, transparent); }
.st-notifs-first { flex: 1; min-width: 0; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.st-notifs-less { display: block; margin-inline-start: auto; min-height: 36px; background: transparent; border: 0; color: var(--vx-text-muted, #9AA6BC); font: inherit; cursor: pointer; }
.st-notifs-toggle:focus-visible, .st-notifs-less:focus-visible, .st-notifs-link:focus-visible, .st-notifs-pc:focus-visible { outline: 2px solid var(--vx-blue, #6E8BFF); outline-offset: 2px; }

.st-kin {
  --lv-base: #2A0A1C; --lv-mid: #6B1A45; --lv-glow: #B0407A; /* kin palette */
  display: flex; align-items: center; gap: 12px; min-height: 56px; margin-top: 12px; padding: 8px 16px;
  border-radius: 18px; text-decoration: none; font-weight: 700;
}
.st-kin-name { flex: 1; min-width: 0; }
.st-kin-map { font-size: 13px; padding: 6px 12px; border-radius: 999px; background: rgba(255, 255, 255, 0.16); }
@media (max-width: 600px) { .st-strip.vlx-living { grid-template-columns: 1fr; } }

/* Location line + info chips in the weather box (same look as desktop). */
.st-area { display: block; margin-top: 6px; font-size: 12.5px; color: rgba(255, 255, 255, 0.9); }
.st-area:empty { display: none; }
.st-setcity {
  margin-top: 4px; min-height: 36px; padding: 4px 10px; border-radius: 999px; cursor: pointer;
  background: transparent; color: #FFFFFF; font: inherit; font-size: 12.5px; font-weight: 600;
  border: 1px solid rgba(255, 255, 255, 0.4);
}
.st-setcity[hidden] { display: none; }
.vlx-living-chips { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; margin: 12px 0 0; padding: 0; }
.vlx-living-chips:empty { display: none; }
.vlx-living-chip {
  display: inline-flex; align-items: center; min-height: 32px; padding: 5px 12px; border-radius: 999px;
  font-size: 12.5px; font-weight: 600; line-height: 1.3; color: #FFFFFF; text-decoration: none;
  background: rgba(0, 0, 0, 0.26); border: 1px solid rgba(255, 255, 255, 0.14);
}
a.vlx-living-chip:hover { background: rgba(0, 0, 0, 0.36); }
.st-setcity:focus-visible, a.vlx-living-chip:focus-visible { outline: 2px solid #FFFFFF; outline-offset: 2px; }

/* Closable rows (PC parity). */
.st-notifs-row { display: flex; align-items: center; }
.st-notifs-row .st-notifs-link { flex: 1; min-width: 0; }
.st-notifs-x {
  flex: 0 0 auto; min-width: 40px; min-height: 40px; margin-inline-end: 2px; border: 0; border-radius: 10px;
  background: transparent; color: var(--vx-text-muted, #9AA6BC); font: inherit; font-size: 18px; line-height: 1; cursor: pointer;
}
.st-notifs-x:hover { color: var(--vx-text, #EEF2F8); }
.st-notifs-x:focus-visible { outline: 2px solid var(--vx-blue, #6E8BFF); outline-offset: 2px; }
.st-notifs-local { margin: 4px 12px 0; font-size: 12.5px; color: var(--vx-text-muted, #9AA6BC); }
.st-notifs-local[hidden] { display: none; }
