/*
Theme Name: Foreign Matter
Theme URI: https://armchairfix.com/
Author: Philisha
Description: Block theme for consumer gunk-report sites (contaminated drinks & food, kitchen gear fails, beauty burns, fashion fails, toys/bikes/batteries, died-after-warranty, Walmart reviews, CPSC/FDA recalls). Food-label look: Gunk Facts panel, hazard stripes, monospace meta. Styles the Drink Gunk Monitor plugin's [drinkgunk] feed and adds [gunk_facts]. Edit everything in Appearance → Editor. Includes a "Night Shift" dark style variation.
Version: 1.14.0
Requires at least: 6.2
Tested up to: 6.8
Requires PHP: 7.4
License: GPL-2.0-or-later
Text Domain: foreign-matter
Tags: block-theme, full-site-editing, one-column, wide-blocks, custom-colors, style-variations
*/

/* ── hazard stripe ─────────────────────────────── */
.fm-stripe {
  height: 12px;
  background: repeating-linear-gradient(-45deg,
    var(--wp--preset--color--hazard) 0 14px,
    var(--wp--preset--color--ink) 14px 28px);
}
.fm-stripe.is-thin { height: 6px; }

.fm-kicker {
  font-family: var(--wp--preset--font-family--mono);
  font-size: var(--wp--preset--font-size--xs);
  text-transform: uppercase;
  letter-spacing: .14em;
  font-weight: 600;
}
.fm-condensed { font-stretch: 75%; }
.fm-hl {
  background: var(--wp--preset--color--hazard);
  color: #141311;
  padding: 0 .12em;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
}

/* ── header ─────────────────────────────────────── */
.fm-header { border-bottom: 3px solid var(--wp--preset--color--ink); }
.fm-header .wp-block-site-title a::before {
  content: ""; display: inline-block; width: .62em; height: .62em; border-radius: 50%;
  background: var(--wp--preset--color--alert); margin-right: .38em; vertical-align: .04em;
}

/* ── Gunk Facts label ──────────────────────────── */
.fm-facts {
  background: var(--wp--preset--color--card);
  color: var(--wp--preset--color--ink);
  border: 2px solid var(--wp--preset--color--ink);
  padding: 10px 14px 12px;
  font-family: var(--wp--preset--font-family--label);
  box-sizing: border-box;
  max-width: min(380px, calc(100% - 8px));
  width: 100%;
  box-shadow: 8px 8px 0 var(--wp--preset--color--ink);
}
.fm-facts h2 {
  font-size: clamp(2.2rem, 5vw, 2.9rem); font-weight: 900; font-stretch: 80%;
  letter-spacing: -.02em; line-height: 1; margin: 0;
}
.fm-facts .fm-sub { font-size: .9rem; border-bottom: 1px solid var(--wp--preset--color--ink); padding-bottom: 4px; margin: 2px 0 0; }
.fm-facts .fm-serv { font-weight: 800; display: flex; justify-content: space-between; border-bottom: 10px solid var(--wp--preset--color--ink); padding: 4px 0 6px; margin: 0; }
.fm-facts .fm-amt { font-size: .75rem; font-weight: 800; border-bottom: 4px solid var(--wp--preset--color--ink); padding: 4px 0 2px; margin: 0; }
.fm-facts .fm-big { display: flex; justify-content: space-between; align-items: baseline; border-bottom: 4px solid var(--wp--preset--color--ink); padding: 2px 0 4px; margin: 0; }
.fm-facts .fm-big b { font-size: 1.9rem; font-weight: 900; }
.fm-facts .fm-big span { font-size: 2.6rem; font-weight: 900; line-height: 1; }
.fm-facts .fm-dv { text-align: right; font-size: .75rem; font-weight: 800; border-bottom: 1px solid var(--wp--preset--color--ink); padding: 3px 0; margin: 0; }
.fm-facts ul { list-style: none; margin: 0; padding: 0; }
.fm-facts li { display: flex; justify-content: space-between; gap: 12px; border-bottom: 1px solid var(--wp--preset--color--ink); padding: 3px 0; font-size: .92rem; }
.fm-facts li.is-indent { padding-left: 1.1em; }
.fm-facts li.is-thick { border-bottom-width: 10px; }
.fm-facts li b { font-weight: 800; }
.fm-facts li em { font-style: normal; font-weight: 800; }
.fm-facts .fm-foot { font-size: .72rem; line-height: 1.35; margin: 6px 0 0; }

/* ── Drink Gunk plugin feed, restyled ───────────── */
body .dg-feed { gap: 0; margin: 0; border-top: 3px solid var(--wp--preset--color--ink); }
body .dg-card {
  border: 0; border-bottom: 1px solid var(--wp--preset--color--line); border-radius: 0;
  background: transparent; padding: 18px 0 20px;
  display: grid; grid-template-columns: 1fr; gap: 6px;
}
body .dg-card:hover { background: color-mix(in srgb, var(--wp--preset--color--hazard) 10%, transparent); }
body .dg-meta { font-family: var(--wp--preset--font-family--mono); font-size: var(--wp--preset--font-size--xs); text-transform: uppercase; letter-spacing: .05em; gap: 6px 8px; opacity: 1; color: var(--wp--preset--color--muted); margin: 0; }
body .dg-chip { border-radius: 0; padding: 2px 7px; background: var(--wp--preset--color--card); border: 1px solid var(--wp--preset--color--line); color: var(--wp--preset--color--ink); font-weight: 600; }
body .dg-chip[class*="dg-src-"] { border-color: transparent; color: #fff; }
body .dg-src-reddit { background: #ff4500; }
body .dg-src-bluesky { background: #1185fe; }
body .dg-src-mastodon { background: #6364ff; }
body .dg-src-youtube { background: #e00; }
body .dg-src-cpsc { background: #0b3d91; }
body .dg-src-walmart { background: #0071ce; }
body .dg-src-fda { background: #1a7f37; }
body .dg-src-target { background: #cc0000; }
body .dg-src-import { background: #555; }
body .dg-src-nhtsa { background: #7f1d1d; }
body .dg-src-hc { background: #d52b1e; }
body .dg-src-fsa { background: #00703c; }
body .dg-src-feeds, body .dg-src-feed { background: #334155; }
body .dg-src-fdadev, body .dg-src-fdashort { background: #1a7f37; }
body .dg-src-fdarpt { background: #6b7280; }
body .dg-topic-chip { background: var(--wp--preset--color--ink); color: var(--wp--preset--color--paper); border-color: transparent; }
body .dg-recall { border-left: 6px solid var(--wp--preset--color--hazard); padding-left: 14px; }
body .dg-img { float: none; justify-self: start; max-width: 160px; max-height: 120px; border: 1px solid var(--wp--preset--color--line); border-radius: 0; background: #fff; }
body .dg-tabs { gap: 6px; margin: 0 0 14px; }
body .dg-tab { border-radius: 0; border: 2px solid var(--wp--preset--color--ink); color: var(--wp--preset--color--ink); font-family: var(--wp--preset--font-family--mono); font-size: var(--wp--preset--font-size--xs); text-transform: uppercase; letter-spacing: .05em; padding: 5px 10px; text-decoration: none; }
body .dg-tab:hover { background: var(--wp--preset--color--hazard); color: #141311; }
body .dg-tab.is-active { background: var(--wp--preset--color--ink); }
body .dg-tab.is-active span { filter: none; color: var(--wp--preset--color--paper); }
body .dg-sev { background: var(--wp--preset--color--alert); color: var(--wp--preset--color--on-alert); border-color: transparent; }
body .dg-body { font-size: 1.05rem; line-height: 1.55; margin: 2px 0; max-width: 68ch; }
body .dg-terms { font-family: var(--wp--preset--font-family--mono); font-size: var(--wp--preset--font-size--xs); opacity: 1; color: var(--wp--preset--color--muted); }
body .dg-terms::first-letter { text-transform: uppercase; }
body .dg-link { font-family: var(--wp--preset--font-family--mono); font-size: var(--wp--preset--font-size--xs); text-transform: uppercase; letter-spacing: .06em; text-decoration: none; justify-self: start; border-bottom: 2px solid var(--wp--preset--color--hazard); }
body .dg-link:hover { color: var(--wp--preset--color--alert); border-color: var(--wp--preset--color--alert); }
body .dg-empty { font-family: var(--wp--preset--font-family--mono); padding: 2rem 0; }
@media (min-width: 900px) {
  body .dg-card { grid-template-columns: 210px 1fr; column-gap: 28px; }
  body .dg-meta { grid-row: span 3; flex-direction: column; align-items: flex-start; }
}

.wp-block-column .fm-facts { margin-left: auto; }
@media (max-width: 781px) { .wp-block-column .fm-facts { margin: 1rem auto 0 0; } }

/* ── buttons / inverted band ────────────────────── */
.wp-block-button.is-style-outline > .wp-block-button__link {
  background: transparent; color: var(--wp--preset--color--ink);
  border: 2px solid var(--wp--preset--color--ink);
}
.wp-block-button.is-style-outline > .wp-block-button__link:hover {
  background: var(--wp--preset--color--ink); color: var(--wp--preset--color--paper);
}
.has-ink-background-color a { color: var(--wp--preset--color--hazard); }
.has-ink-background-color a:hover { color: var(--wp--preset--color--paper); }
.fm-band .fm-hl { color: #141311; }

/* ── posts / misc ───────────────────────────────── */
.fm-post-card { border-top: 3px solid var(--wp--preset--color--ink); padding-top: 14px; }
.fm-boxed { border: 2px solid var(--wp--preset--color--ink); background: var(--wp--preset--color--card); }
.fm-404 { font-stretch: 70%; }
.wp-block-navigation .wp-block-navigation-item__content:hover { color: var(--wp--preset--color--alert); }
:where(.wp-site-blocks) *:focus-visible { outline: 3px solid var(--wp--preset--color--alert); outline-offset: 2px; }

/* ── reader comments (Gunk Monitor 2.2+) ───────── */
body .dg-talk { margin-top: 8px; }
body .dg-comments li { border-left: 3px solid var(--wp--preset--color--hazard); background: var(--wp--preset--color--card); border-radius: 0; font-size: .95rem; }
body .dg-comments li b { font-family: var(--wp--preset--font-family--mono); font-size: var(--wp--preset--font-size--xs); text-transform: uppercase; letter-spacing: .05em; margin-right: 6px; }
body .dg-cbox summary { font-family: var(--wp--preset--font-family--mono); font-size: var(--wp--preset--font-size--xs); text-transform: uppercase; letter-spacing: .06em; color: var(--wp--preset--color--muted); }
body .dg-cbox summary:hover, body .dg-cbox[open] summary { color: var(--wp--preset--color--alert); }
body .dg-cform textarea, body .dg-cform input[name=name] { border: 2px solid var(--wp--preset--color--ink); border-radius: 0; background: var(--wp--preset--color--card); color: var(--wp--preset--color--ink); }
body .dg-cform textarea:focus, body .dg-cform input[name=name]:focus { outline: 3px solid var(--wp--preset--color--hazard); outline-offset: 0; }
body .dg-cform button { background: var(--wp--preset--color--ink); color: var(--wp--preset--color--hazard); border: 0; border-radius: 0; font-family: var(--wp--preset--font-family--label); text-transform: uppercase; letter-spacing: .06em; padding: 9px 18px; }
body .dg-cform button:hover { background: var(--wp--preset--color--alert); color: var(--wp--preset--color--on-alert); }
body .dg-cform button:disabled { opacity: .6; cursor: wait; }
body .dg-consent, body .dg-count { font-family: var(--wp--preset--font-family--mono); }

/* ── report pages + card links (Gunk Monitor 2.4+) ─ */
body .dg-links { display: flex; flex-wrap: wrap; gap: 6px 18px; align-items: baseline; }
body .dg-orig { font-family: var(--wp--preset--font-family--mono); font-size: var(--wp--preset--font-size--xs); text-transform: uppercase; letter-spacing: .05em; color: var(--wp--preset--color--muted); text-decoration: none; }
body .dg-orig:hover { color: var(--wp--preset--color--alert); }
body .dg-report .dg-meta { font-family: var(--wp--preset--font-family--mono); font-size: var(--wp--preset--font-size--xs); text-transform: uppercase; letter-spacing: .05em; color: var(--wp--preset--color--muted); }
body .dg-report-title { font-size: var(--wp--preset--font-size--xxl); font-weight: 900; font-stretch: 78%; letter-spacing: -.015em; line-height: 1.02; }
body .dg-report-body { font-size: var(--wp--preset--font-size--lg); }
body .dg-report-img { border: 2px solid var(--wp--preset--color--ink); }
body .dg-embed { border: 2px dashed var(--wp--preset--color--ink); background: var(--wp--preset--color--card); }
body .dg-embed.is-loaded { background: transparent; }
body .dg-embed-load { background: var(--wp--preset--color--ink); color: var(--wp--preset--color--hazard); border: 0; border-radius: 0; text-transform: uppercase; letter-spacing: .06em; font-family: var(--wp--preset--font-family--label); }
body .dg-embed-load:hover { background: var(--wp--preset--color--alert); color: var(--wp--preset--color--on-alert); }
body .dg-embed-note, body .dg-back { font-family: var(--wp--preset--font-family--mono); font-size: var(--wp--preset--font-size--xs); }
body .dg-related h2 { border-top: 3px solid var(--wp--preset--color--ink); padding-top: 14px; }
body.dg-report-view .dg-report .dg-talk { margin-top: 1.5em; }
body .dg-report .dg-meta { flex-direction: row; align-items: center; justify-content: flex-start; grid-row: auto; }

/* ── topic + item browse pages (Gunk Monitor 2.5+) ─ */
body a.dg-chip { text-decoration: none; }
body a.dg-topic-chip:hover { background: var(--wp--preset--color--alert); color: var(--wp--preset--color--on-alert); }
body a.dg-item-chip { border-style: dashed; }
body a.dg-item-chip:hover { background: var(--wp--preset--color--hazard); color: #141311; border-style: solid; }
body .dg-brand-chip { opacity: .8; }
body .dg-crumbs { font-family: var(--wp--preset--font-family--mono); font-size: var(--wp--preset--font-size--xs); text-transform: uppercase; letter-spacing: .05em; color: var(--wp--preset--color--muted); }
body .dg-crumbs a { color: inherit; }
body .dg-listing-title { font-size: var(--wp--preset--font-size--huge); font-weight: 900; font-stretch: 75%; letter-spacing: -.02em; text-transform: capitalize; }
body .dg-kicker, body .dg-count { font-family: var(--wp--preset--font-family--mono); font-size: var(--wp--preset--font-size--xs); text-transform: uppercase; letter-spacing: .08em; color: var(--wp--preset--color--alert); opacity: 1; }
body .dg-count { color: var(--wp--preset--color--muted); }
body .dg-itemnav { margin: 16px 0 24px; padding-bottom: 16px; border-bottom: 3px solid var(--wp--preset--color--ink); }
body .dg-itemlink { border-radius: 0; border: 2px solid var(--wp--preset--color--ink); color: var(--wp--preset--color--ink); font-family: var(--wp--preset--font-family--mono); font-size: var(--wp--preset--font-size--xs); text-transform: uppercase; letter-spacing: .04em; padding: 4px 9px; }
body .dg-itemlink:hover { background: var(--wp--preset--color--hazard); color: #141311; }
body .dg-itemlink.is-active { background: var(--wp--preset--color--ink); filter: none; }
body .dg-itemlink.is-active, body .dg-itemlink.is-active span { color: var(--wp--preset--color--hazard); filter: none; }
body .dg-more summary { font-family: var(--wp--preset--font-family--mono); font-size: var(--wp--preset--font-size--xs); text-transform: uppercase; color: var(--wp--preset--color--alert); }
body .dg-pager { font-family: var(--wp--preset--font-family--mono); font-size: var(--wp--preset--font-size--sm); text-transform: uppercase; }
body .dg-listing-page .dg-feed { border-top: 0; }
