/* =========================================================
   SafeStore — style.css
   Look: a scrappy civic newspaper / zine. Newsprint paper,
   heavy ink, caution-tape yellow, rubber-stamp labels.
   Things are allowed to be a little crooked on purpose.
   ========================================================= */

/* ---------- colors + fonts (change these first) ---------- */
:root {
  --paper: #f3ede0;
  --paper-dark: #e6dcc6;
  --ink: #1c1a17;
  --ink-soft: #4a453d;
  --caution: #f5c518;      /* caution tape yellow */
  --badge: #1f3b5c;        /* badge / uniform blue */
  --stamp: #b8322a;        /* rubber stamp red */
  --white: #fffdf7;

  --font-head: "Archivo Black", "Arial Black", Impact, sans-serif;
  --font-body: "Source Serif 4", Georgia, "Times New Roman", serif;
  --font-type: "Courier Prime", "Courier New", monospace;

  --line: 3px solid var(--ink);
  --shadow: 5px 5px 0 var(--ink);
  --shadow-small: 3px 3px 0 var(--ink);
}

/* keeps hidden logged-in / logged-out blocks hidden no matter what */
[hidden] { display: none !important; }

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background-color: var(--paper);
  /* faint newsprint speckle */
  background-image:
    radial-gradient(rgba(0,0,0,0.045) 1px, transparent 1px),
    radial-gradient(rgba(0,0,0,0.03) 1px, transparent 1px);
  background-size: 7px 7px, 13px 13px;
  background-position: 0 0, 3px 5px;
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.08rem;
  line-height: 1.6;
}

main {
  max-width: 1080px;
  margin: 0 auto;
  padding: 2rem 1.25rem 4rem;
}

h1, h2, h3 {
  font-family: var(--font-head);
  line-height: 1.1;
  letter-spacing: -0.01em;
  margin: 0 0 0.6em;
}
h1 { font-size: clamp(2.2rem, 6vw, 4rem); text-transform: uppercase; }
h2 { font-size: clamp(1.5rem, 3.5vw, 2.2rem); }
h3 { font-size: 1.2rem; }

/* marker highlight behind section headings */
main > section > h2,
main > h2 {
  display: inline-block;
  background: linear-gradient(transparent 55%, var(--caution) 55%, var(--caution) 88%, transparent 88%);
  padding: 0 0.15em;
}

p { margin: 0 0 1em; }

a { color: var(--badge); text-decoration-thickness: 2px; text-underline-offset: 3px; }
a:hover { color: var(--stamp); }

img, iframe { max-width: 100%; display: block; }

::selection { background: var(--caution); color: var(--ink); }

:focus-visible { outline: 3px dashed var(--stamp); outline-offset: 3px; }

/* ---------- buttons & call-to-action links ---------- */
button,
#hero a,
#free-value > a,
#latest-posts > a,
#product-teaser > a,
#shop-to-news > a,
#about-links a,
#feed-sidebar a,
#buy-button-placeholder {
  display: inline-block;
  font-family: var(--font-head);
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  text-decoration: none;
  color: var(--ink);
  background: var(--caution);
  border: var(--line);
  box-shadow: var(--shadow-small);
  padding: 0.65em 1.2em;
  cursor: pointer;
  transition: transform 0.08s, box-shadow 0.08s;
}
button:hover,
#hero a:hover, #free-value > a:hover, #latest-posts > a:hover,
#product-teaser > a:hover, #shop-to-news > a:hover, #about-links a:hover,
#feed-sidebar a:hover, #buy-button-placeholder:hover {
  transform: translate(-1px, -1px);
  box-shadow: 4px 4px 0 var(--ink);
  color: var(--ink);
}
button:active,
#hero a:active, #buy-button-placeholder:active {
  transform: translate(3px, 3px);
  box-shadow: 0 0 0 var(--ink);
}

/* second button in a pair = white */
#hero-cta-shop,
#about-links a + a { background: var(--white); margin-left: 0.6rem; }

/* ---------- header ---------- */
#site-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1.5rem;
  padding: 0.9rem 1.25rem;
  background: var(--ink);
  color: var(--paper);
  border-bottom: 6px solid var(--caution);
}

#logo {
  font-family: var(--font-head);
  font-size: 1.7rem;
  color: var(--caution);
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: -0.02em;
  transform: rotate(-2deg);
  display: inline-block;
}
#logo::before { content: "▣ "; color: var(--paper); }
#logo:hover { color: var(--white); }

#main-nav { flex: 1; }
#main-nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.2rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
#main-nav a {
  color: var(--paper);
  font-family: var(--font-type);
  font-weight: 700;
  text-decoration: none;
  text-transform: uppercase;
  font-size: 0.9rem;
  padding-bottom: 2px;
  border-bottom: 2px solid transparent;
}
#main-nav a:hover,
#main-nav a[aria-current="page"] { color: var(--caution); border-bottom-color: var(--caution); }

#site-header [data-auth] {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  font-family: var(--font-type);
  font-size: 0.9rem;
}
#site-header [data-auth] a { color: var(--paper); }
#site-header [data-auth] a:last-of-type:not(:first-child),
#site-header [data-auth="logged-out"] a.nav-signup {
  background: var(--caution);
  color: var(--ink);
  padding: 0.3em 0.7em;
  text-decoration: none;
  font-weight: 700;
  border: 2px solid var(--caution);
}
#site-header button {
  font-size: 0.8rem;
  padding: 0.3em 0.7em;
  box-shadow: none;
  background: transparent;
  color: var(--paper);
  border: 2px solid var(--paper);
}

/* ---------- caution-tape ticker ---------- */
#headline-ticker,
#product-ticker {
  background: var(--caution);
  border-top: var(--line);
  border-bottom: var(--line);
  position: relative;
  font-family: var(--font-head);
  text-transform: uppercase;
  font-size: 1.05rem;
  padding: 0.55rem 0;
  /* the tape stripes on the edges */
  box-shadow:
    inset 0 6px 0 -3px var(--caution),
    0 6px 0 -3px transparent;
}
#headline-ticker::before,
#product-ticker::before {
  content: "";
  position: absolute;
  inset: auto 0 -11px 0;
  height: 8px;
  background: repeating-linear-gradient(-45deg, var(--ink) 0 10px, var(--caution) 10px 20px);
}
#headline-ticker a { color: var(--ink); text-decoration: none; }
#headline-ticker a:hover { text-decoration: underline; }
.ticker-content span { padding: 0 0.4rem; }

/* ---------- home: hero ---------- */
#hero {
  position: relative;
  padding: 3.5rem 0 2.5rem;
  border-bottom: var(--line);
  margin-bottom: 2.5rem;
}
#hero h1 {
  max-width: 14ch;
  font-size: clamp(2.6rem, 8vw, 5.4rem);
  line-height: 0.95;
}
#hero p {
  max-width: 34rem;
  font-size: 1.25rem;
  color: var(--ink-soft);
}

/* ---------- home: free value ---------- */
#free-value ul {
  list-style: none;
  padding: 0;
  margin: 1rem 0 2rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
}
#free-value li {
  background: var(--white);
  border: var(--line);
  box-shadow: var(--shadow);
  padding: 1.25rem 1.25rem 0.5rem;
}
/* slightly crooked cards, like they were pinned up by hand */
#free-value li:nth-child(1) { transform: rotate(-1deg); }
#free-value li:nth-child(2) { transform: rotate(0.6deg); margin-top: 0.6rem; }
#free-value li:nth-child(3) { transform: rotate(-0.4deg); }
#free-value h3 { border-bottom: 2px dashed var(--ink); padding-bottom: 0.4rem; }

main > section { margin-bottom: 3.5rem; }

/* ---------- post cards (home + news) ---------- */
.post,
.post-preview {
  background: var(--white);
  border: var(--line);
  box-shadow: var(--shadow);
  padding: 1.25rem 1.4rem 1rem;
  margin-bottom: 1.75rem;
  position: relative;
}
.post:nth-of-type(even) { transform: rotate(0.3deg); }

.post-type {
  display: inline-block;
  font-family: var(--font-type);
  font-weight: 700;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--white);
  background: var(--badge);
  padding: 0.15em 0.55em;
  margin-bottom: 0.6rem;
  transform: rotate(-1.5deg);
}
.post[data-post-type="repost"] .post-type { background: var(--ink-soft); }
.post[data-post-type="video"] .post-type { background: var(--stamp); }
.post[data-post-type="daily"] .post-type { background: var(--caution); color: var(--ink); }

/* inside a <p class="post-meta"> the type label sits inline */
.post-meta .post-type { margin: 0; transform: none; }

.post-title a,
.post-preview h3 a { color: var(--ink); text-decoration: none; }
.post-title a:hover,
.post-preview h3 a:hover { text-decoration: underline; text-decoration-color: var(--caution); text-decoration-thickness: 5px; }

.post-meta,
.comment-meta {
  font-family: var(--font-type);
  font-size: 0.85rem;
  color: var(--ink-soft);
}
.post-source {
  font-family: var(--font-type);
  font-size: 0.85rem;
  border-left: 4px solid var(--caution);
  padding-left: 0.6rem;
}

.post-video {
  aspect-ratio: 16 / 9;
  background: var(--ink);
  border: var(--line);
  margin-bottom: 1rem;
}
.post-video:empty::after {
  content: "▶  VIDEO GOES HERE";
  display: grid;
  place-items: center;
  height: 100%;
  color: var(--caution);
  font-family: var(--font-head);
}
.post-video iframe { width: 100%; height: 100%; border: 0; }

/* like / dislike / save row */
.post-actions,
.comment-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  border-top: 2px dashed var(--paper-dark);
  padding-top: 0.8rem;
  margin-top: 0.8rem;
}
.post-actions button,
.post-actions a,
.comment-actions button {
  font-family: var(--font-type);
  font-weight: 700;
  font-size: 0.85rem;
  text-transform: none;
  background: var(--paper);
  color: var(--ink);
  border: 2px solid var(--ink);
  box-shadow: 2px 2px 0 var(--ink);
  padding: 0.3em 0.7em;
  text-decoration: none;
}
.post-actions [data-action="like"][aria-pressed="true"],
.comment-actions [data-action="comment-like"][aria-pressed="true"] { background: var(--caution); }
.post-actions [data-action="dislike"][aria-pressed="true"],
.comment-actions [data-action="comment-dislike"][aria-pressed="true"] { background: var(--ink); color: var(--paper); }
.post-actions [data-action="save"][aria-pressed="true"] { background: var(--badge); color: var(--white); }
.comment-actions [data-action="report"] { margin-left: auto; color: var(--stamp); border-color: var(--stamp); box-shadow: none; background: transparent; }

/* ---------- news page layout ---------- */
#join-prompt {
  background: var(--caution);
  border: var(--line);
  padding: 0.8rem 1.1rem;
  margin-bottom: 2rem;
  font-weight: 600;
  transform: rotate(-0.5deg);
}
#join-prompt p { margin: 0; }

#feed-filters {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 0.8rem 1rem;
  background: var(--paper-dark);
  border: var(--line);
  padding: 1rem;
  margin-bottom: 2.5rem;
  font-family: var(--font-type);
  font-size: 0.9rem;
}
#feed-filters fieldset {
  flex-basis: 100%;
  border: 0;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}
#feed-filters legend { font-weight: 700; text-transform: uppercase; margin-bottom: 0.3rem; }
#feed-filters fieldset label {
  border: 2px solid var(--ink);
  background: var(--white);
  padding: 0.2em 0.7em;
  cursor: pointer;
}
#feed-filters fieldset label:has(input:checked) { background: var(--ink); color: var(--caution); }
#feed-filters fieldset input { position: absolute; opacity: 0; pointer-events: none; }
#feed-filters > label { display: block; font-weight: 700; text-transform: uppercase; font-size: 0.75rem; margin-bottom: -0.6rem; flex-basis: 100%; }
@media (min-width: 760px) {
  #feed-filters > label { flex-basis: auto; margin-bottom: 0; }
}

/* sidebar sits beside the feed on wide screens */
@media (min-width: 900px) {
  body:has(#post-feed) main {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 280px;
    column-gap: 2.5rem;
  }
  body:has(#post-feed) main > * { grid-column: 1 / -1; }
  body:has(#post-feed) #post-feed { grid-column: 1; }
  body:has(#post-feed) #feed-sidebar { grid-column: 2; grid-row: span 2; align-self: start; position: sticky; top: 1rem; }
  body:has(#post-feed) #daily-brief { grid-column: 1; }
}
#feed-sidebar section {
  border: var(--line);
  background: var(--badge);
  color: var(--white);
  padding: 1.1rem;
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow);
}
#feed-sidebar section + section { background: var(--white); color: var(--ink); transform: rotate(1deg); }
#feed-sidebar h2 { font-size: 1.25rem; background: none; }

/* daily brief: looks like a typed bulletin */
#daily-brief {
  background: var(--white);
  border: var(--line);
  border-left: 14px solid var(--ink);
  padding: 1.5rem 1.5rem 0.5rem;
  box-shadow: var(--shadow);
}
#daily-brief > h2 { background: none; font-size: 1.1rem; font-family: var(--font-type); text-transform: uppercase; letter-spacing: 0.05em; }
#daily-brief h3 {
  font-size: 0.85rem;
  font-family: var(--font-type);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--stamp);
  margin-bottom: 0.2rem;
}

#feed-pagination { text-align: center; font-family: var(--font-head); text-transform: uppercase; }

/* ---------- single post page ---------- */
#post {
  background: var(--white);
  border: var(--line);
  box-shadow: 8px 8px 0 var(--ink);
  padding: clamp(1.25rem, 4vw, 3rem);
  margin-bottom: 3rem;
}
#post .post-title { font-size: clamp(2rem, 5vw, 3.2rem); text-transform: none; }
#post-body { font-size: 1.15rem; max-width: 42rem; }
#post-body h2 { background: none; margin-top: 1.5em; }
#post-video { aspect-ratio: 16 / 9; background: var(--ink); margin-bottom: 1.5rem; }
.disclaimer {
  font-family: var(--font-type);
  font-size: 0.8rem;
  color: var(--stamp);
  text-transform: uppercase;
  margin-top: 1.5rem;
}

#comments select { margin-bottom: 1rem; }
#comment-list,
.comment-replies { list-style: none; padding: 0; margin: 0; }
.comment {
  border-left: 4px solid var(--ink);
  background: var(--white);
  padding: 0.8rem 1rem;
  margin: 1rem 0;
}
.comment-replies { margin-left: 1.25rem; }
.comment-replies .comment { border-left-color: var(--caution); background: var(--paper); }
.comment-author { font-weight: 700; color: var(--ink); }
.comment-text { margin: 0.3rem 0 0; }
#comment-login-prompt {
  border: 2px dashed var(--ink);
  padding: 1rem;
  text-align: center;
  font-weight: 600;
}
#load-more-comments { background: var(--white); }

dialog {
  border: var(--line);
  box-shadow: 8px 8px 0 var(--ink);
  background: var(--paper);
  max-width: 30rem;
}
dialog::backdrop { background: rgba(28, 26, 23, 0.6); }

#related-posts ul { padding-left: 1.2rem; }

/* ---------- forms (signup, login, newsletter, account...) ---------- */
#signup, #verify, #login, #reset-request, #reset-confirm {
  max-width: 30rem;
  margin: 1rem auto 2rem;
  background: var(--white);
  border: var(--line);
  box-shadow: 8px 8px 0 var(--ink);
  padding: 2rem;
  position: relative;
}
/* a strip of tape holding the card to the page */
#signup::before, #verify::before, #login::before, #reset-request::before {
  content: "";
  position: absolute;
  top: -14px;
  left: 50%;
  width: 110px;
  height: 26px;
  background: rgba(245, 197, 24, 0.8);
  transform: translateX(-50%) rotate(-3deg);
  border-left: 2px dotted rgba(0,0,0,0.15);
  border-right: 2px dotted rgba(0,0,0,0.15);
}
#signup h1, #verify h1, #login h1, #reset-request h1 { font-size: 2rem; }

.form-field { margin-bottom: 1.1rem; }
fieldset.form-field { border: 2px dashed var(--ink-soft); padding: 0.8rem 1rem; }
legend { font-family: var(--font-type); font-weight: 700; text-transform: uppercase; font-size: 0.85rem; padding: 0 0.3rem; }

label { font-family: var(--font-type); font-size: 0.9rem; font-weight: 700; }
fieldset label { display: block; font-weight: 400; margin: 0.25rem 0; }
.form-field > label { display: block; margin-bottom: 0.3rem; }

input[type="text"],
input[type="email"],
input[type="password"],
input[type="search"],
select,
textarea {
  width: 100%;
  font: inherit;
  font-family: var(--font-type);
  font-size: 1rem;
  color: var(--ink);
  background: var(--paper);
  border: var(--line);
  border-radius: 0;
  padding: 0.6em 0.7em;
}
#feed-filters select, #feed-filters input[type="search"] { width: auto; min-width: 10rem; background: var(--white); }
input:focus, select:focus, textarea:focus { outline: none; background: var(--white); box-shadow: var(--shadow-small); }
input[type="checkbox"], input[type="radio"] { accent-color: var(--ink); width: 1.05em; height: 1.05em; vertical-align: -0.12em; margin-right: 0.35em; }

#verify-code, #reset-code {
  font-size: 2rem;
  letter-spacing: 0.5em;
  text-align: center;
  font-weight: 700;
}

[role="alert"] {
  background: var(--stamp);
  color: var(--white);
  font-family: var(--font-type);
  padding: 0.5rem 0.8rem;
}
[role="status"] {
  background: var(--caution);
  font-family: var(--font-type);
  font-weight: 700;
  padding: 0.5rem 0.8rem;
}

#password-rules { font-size: 0.85rem; color: var(--ink-soft); margin: 0.3rem 0 0; }
#signup form button[type="submit"],
#login form button[type="submit"],
#verify-form button[type="submit"] { width: 100%; font-size: 1.15rem; }
#resend-button { background: none; border: 0; box-shadow: none; padding: 0; text-decoration: underline; text-transform: none; font-family: var(--font-body); color: var(--badge); font-size: inherit; }

/* newsletter + account + contact forms: wider */
#newsletter-preferences, #contact-form, #account-sections ~ section form {
  max-width: 40rem;
}
#newsletter-preferences {
  background: var(--white);
  border: var(--line);
  box-shadow: var(--shadow);
  padding: 1.75rem;
  margin-bottom: 3rem;
}
#welcome-message {
  background: var(--caution);
  border: var(--line);
  padding: 1.25rem 1.5rem 0.5rem;
  transform: rotate(-0.7deg);
}

/* ---------- account ---------- */
#account-sections ul {
  list-style: none;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 2.5rem;
}
#account-sections a {
  font-family: var(--font-type);
  font-weight: 700;
  border: 2px solid var(--ink);
  padding: 0.25em 0.7em;
  text-decoration: none;
  color: var(--ink);
  background: var(--white);
}
#account-sections a:hover { background: var(--caution); }
#account-sections ~ section {
  border-top: var(--line);
  padding-top: 1.5rem;
}
#delete-account { border-top-color: var(--stamp) !important; }
#delete-account h2 { background: none; color: var(--stamp); }
#delete-account button { background: var(--stamp); color: var(--white); }

/* ---------- saved ---------- */
#saved-list { list-style: none; padding: 0; }
.saved-item {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 0 1rem;
  background: var(--white);
  border: 2px solid var(--ink);
  border-left: 10px solid var(--badge);
  padding: 0.8rem 1rem;
  margin-bottom: 0.8rem;
}
.saved-item a { font-family: var(--font-head); color: var(--ink); text-decoration: none; }
.saved-item .post-meta { grid-column: 1; margin: 0; }
.saved-item button { grid-column: 2; grid-row: 1 / span 2; font-size: 0.8rem; background: var(--white); }

/* ---------- shop ---------- */
#product-hero {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2.5rem;
  align-items: start;
  padding-top: 1rem;
}
/* ---------- product slideshow ---------- */
.slideshow {
  position: relative;
  background: var(--white);
  border: var(--line);
  box-shadow: 8px 8px 0 var(--ink);
  transform: rotate(-1deg);
  padding: 0.7rem 0.7rem 0.5rem;   /* like a printed photo with a border */
}
.slideshow:focus-visible { outline: 3px dashed var(--stamp); outline-offset: 6px; }

.slides {
  position: relative;
  aspect-ratio: 4 / 3;
  background: var(--paper-dark);
  border: 2px solid var(--ink);
  overflow: hidden;
}
.slide {
  position: absolute;
  inset: 0;
  margin: 0;
  display: none;
}
.slide.is-active { display: block; animation: slide-pop 0.25s ease-out; }
@keyframes slide-pop { from { opacity: 0; transform: translateX(14px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .slide.is-active { animation: none; } }

.slide img,
.slide video,
.slide iframe {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border: 0;
  background: var(--ink);
}
.slide-video video { object-fit: contain; }

.slide figcaption {
  position: absolute;
  left: 0.7rem;
  bottom: 0.7rem;
  font-family: var(--font-type);
  font-weight: 700;
  font-size: 0.85rem;
  background: var(--caution);
  border: 2px solid var(--ink);
  padding: 0.15em 0.5em;
  transform: rotate(-2deg);
  pointer-events: none;
}
.slide-video figcaption { top: 0.7rem; bottom: auto; background: var(--stamp); color: var(--white); }

/* photo file not uploaded yet */
.slide.is-missing img { visibility: hidden; }
.slide.is-missing::before {
  content: attr(data-placeholder);
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-family: var(--font-head);
  color: var(--ink-soft);
  background: repeating-linear-gradient(45deg, transparent 0 14px, rgba(0,0,0,0.05) 14px 28px);
}

.slide-arrow {
  position: absolute;
  top: calc(50% - 1.6rem);
  width: 3.2rem;
  height: 3.2rem;
  padding: 0;
  font-family: var(--font-head);
  font-size: 2.2rem;
  line-height: 1;
  background: var(--caution);
  border: var(--line);
  box-shadow: var(--shadow-small);
  z-index: 2;
}
.slide-prev { left: -1rem; transform: rotate(-4deg); }
.slide-next { right: -1rem; transform: rotate(3deg); }
.slide-prev:hover { transform: rotate(-4deg) translate(-1px, -1px); }
.slide-next:hover { transform: rotate(3deg) translate(-1px, -1px); }

.slide-counter {
  position: absolute;
  top: 1.3rem;
  right: 1.3rem;
  margin: 0;
  font-family: var(--font-type);
  font-weight: 700;
  font-size: 0.8rem;
  background: var(--ink);
  color: var(--paper);
  padding: 0.1em 0.5em;
  z-index: 2;
}

.slide-dots {
  display: flex;
  justify-content: center;
  gap: 0.45rem;
  padding-top: 0.6rem;
}
.slide-dot {
  width: 0.95rem;
  height: 0.95rem;
  padding: 0;
  border: 2px solid var(--ink);
  border-radius: 50%;
  background: var(--white);
  box-shadow: none;
}
.slide-dot:hover { transform: none; box-shadow: none; background: var(--paper-dark); }
.slide-dot.is-active { background: var(--ink); }
.slide-dot-video {
  width: auto;
  height: 0.95rem;
  border-radius: 0;
  font-size: 0.6rem;
  line-height: 1;
  padding: 0 0.35rem;
  color: var(--stamp);
}
.slide-dot-video.is-active { background: var(--stamp); color: var(--white); border-color: var(--stamp); }

#product-tagline { font-size: 1.3rem; font-style: italic; }
#product-price {
  display: inline-block;
  font-family: var(--font-head);
  font-size: 2.4rem;
  background: var(--caution);
  border: var(--line);
  padding: 0 0.4em;
  transform: rotate(-2deg);
  margin-bottom: 1.25rem;
}
#buy-button-container { margin-bottom: 1.5rem; }
#buy-button-container shopify-context { display: block; }

.buy-buttons { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 1rem; }
.buy-buttons button { font-size: 1.2rem; padding: 0.8em 1.5em; }
.buy-buttons .add-to-cart { background: var(--white); }
.buy-buttons button:disabled {
  background: var(--paper-dark);
  color: var(--ink-soft);
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}
.buy-buttons button:disabled::after { content: " (sold out)"; font-size: 0.75em; }

shopify-variant-selector { display: block; font-family: var(--font-type); margin-top: 0.5rem; }

.secure-note {
  font-family: var(--font-type);
  font-size: 0.78rem;
  color: var(--ink-soft);
  margin-top: 0.9rem;
}
.secure-note::before { content: "🔒 "; }

/* header cart button (shop page) */
#cart-button {
  font-family: var(--font-type);
  font-size: 0.85rem;
  padding: 0.3em 0.8em;
  box-shadow: none;
  border: 2px solid var(--caution);
}
#cart-button::before { content: "🛒 "; }

/* the Shopify cart drawer: match the site */
shopify-cart::part(dialog) {
  border: var(--line);
  box-shadow: 8px 8px 0 var(--ink);
  border-radius: 0;
  background: var(--paper);
  font-family: var(--font-body);
}
shopify-cart::part(primary-button) {
  font-family: var(--font-head);
  text-transform: uppercase;
  background: var(--caution);
  color: var(--ink);
  border: var(--line);
  border-radius: 0;
  box-shadow: var(--shadow-small);
}
shopify-cart::part(secondary-button) {
  border-radius: 0;
  fill: var(--ink);
}
#buy-button-placeholder { font-size: 1.25rem; padding: 0.8em 1.6em; }

#product-quick-facts { list-style: none; padding: 0; }
#product-quick-facts li {
  padding: 0.4rem 0 0.4rem 2rem;
  border-bottom: 1px dashed var(--ink-soft);
  position: relative;
}
#product-quick-facts li::before {
  content: "✔";
  position: absolute;
  left: 0.2rem;
  color: var(--stamp);
  font-weight: 900;
}

#product-problem {
  background: var(--ink);
  color: var(--paper);
  padding: 2.5rem clamp(1.25rem, 4vw, 3rem);
  border-left: 14px solid var(--caution);
}
#product-problem h2 { background: none; color: var(--caution); }
#product-problem p { font-size: 1.3rem; max-width: 40rem; margin: 0; }

#how-it-works ol {
  list-style: none;
  counter-reset: step;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
}
#how-it-works li {
  counter-increment: step;
  background: var(--white);
  border: var(--line);
  padding: 3rem 1.2rem 0.6rem;
  position: relative;
}
#how-it-works li::before {
  content: counter(step);
  position: absolute;
  top: -1.2rem;
  left: 1rem;
  font-family: var(--font-head);
  font-size: 2.2rem;
  width: 3.2rem;
  height: 3.2rem;
  display: grid;
  place-items: center;
  background: var(--caution);
  border: var(--line);
  border-radius: 50%;
}

#product-specs table {
  width: 100%;
  max-width: 40rem;
  border-collapse: collapse;
  font-family: var(--font-type);
  background: var(--white);
  border: var(--line);
}
#product-specs th, #product-specs td { text-align: left; padding: 0.6rem 0.9rem; border-bottom: 1px solid var(--paper-dark); }
#product-specs th { width: 40%; background: var(--paper-dark); text-transform: uppercase; font-size: 0.85rem; }

details {
  border: var(--line);
  background: var(--white);
  margin-bottom: 0.7rem;
  max-width: 46rem;
}
summary {
  font-family: var(--font-head);
  padding: 0.8rem 1rem;
  cursor: pointer;
  list-style: none;
}
summary::-webkit-details-marker { display: none; }
summary::after { content: " +"; float: right; }
details[open] summary { background: var(--caution); border-bottom: var(--line); }
details[open] summary::after { content: " –"; }
details p { padding: 0.8rem 1rem 0; }

#shipping-returns {
  border: 3px dashed var(--ink);
  padding: 1.5rem;
  max-width: 46rem;
}
#shipping-returns h2 { background: none; }

#shop-to-news, #product-teaser, #quick-signup {
  background: var(--badge);
  color: var(--white);
  border: var(--line);
  box-shadow: var(--shadow);
  padding: 2rem;
}
#shop-to-news h2, #product-teaser h2, #quick-signup h2 { background: none; color: var(--caution); }
#product-teaser { background: var(--ink); }

/* home: email box */
#quick-signup-form { display: flex; flex-wrap: wrap; gap: 0.6rem; align-items: end; }
#quick-signup-form label { flex-basis: 100%; }
#quick-signup-form input { flex: 1; min-width: 14rem; background: var(--white); }

/* ---------- about / guidelines / legal ---------- */
#about-page { max-width: 900px; }
#about-page > section > p,
#about-page > section > ul:not(.tag-list):not(.difference-list) { max-width: 44rem; }
.about-lede {
  font-size: 1.35rem;
  line-height: 1.5;
  max-width: 40rem;
  border-left: 8px solid var(--caution);
  padding-left: 1rem;
}

.about-reasons { list-style: none; padding: 0; counter-reset: reason; }
.about-reasons li {
  counter-increment: reason;
  position: relative;
  padding: 0.2rem 0 0.2rem 3.8rem;
  margin-bottom: 1.2rem;
}
.about-reasons li::before {
  content: counter(reason);
  position: absolute;
  left: 0;
  top: 0;
  font-family: var(--font-head);
  font-size: 2.6rem;
  line-height: 1;
  color: var(--caution);
  -webkit-text-stroke: 2px var(--ink);
}
.about-reasons h3 { margin-bottom: 0.3rem; }

.about-pullquote {
  font-family: var(--font-head);
  font-size: clamp(1.3rem, 3vw, 1.8rem);
  line-height: 1.25;
  background: var(--ink);
  color: var(--caution);
  padding: 1.5rem 1.75rem;
  max-width: none !important;
  transform: rotate(-0.6deg);
  box-shadow: 6px 6px 0 var(--caution);
}

.evidence-list {
  list-style: none;
  padding: 0;
  counter-reset: ev;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.25rem;
}
.evidence-list li {
  counter-increment: ev;
  background: var(--white);
  border: var(--line);
  box-shadow: var(--shadow-small);
  padding: 1rem 1.1rem 0.6rem;
  position: relative;
}
.evidence-list li:nth-child(3n+2) { transform: rotate(0.5deg); }
.evidence-list li:nth-child(3n) { transform: rotate(-0.4deg); }
.evidence-list li::before {
  content: "EXHIBIT " counter(ev);
  display: inline-block;
  font-family: var(--font-type);
  font-weight: 700;
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  color: var(--stamp);
  border: 2px solid var(--stamp);
  padding: 0 0.4em;
  margin-bottom: 0.5rem;
  transform: rotate(-2deg);
}
.evidence-list h3 { font-size: 1.05rem; }
.evidence-list p { font-size: 0.98rem; }
.evidence-source {
  font-family: var(--font-type);
  font-size: 0.8rem !important;
  border-top: 1px dashed var(--ink-soft);
  padding-top: 0.4rem;
}

.honest-note {
  margin-top: 2rem;
  border: 3px dashed var(--ink);
  background: var(--paper-dark);
  padding: 1.1rem 1.4rem 0.4rem;
  max-width: 44rem;
}

.difference-list { list-style: none; padding: 0; max-width: 46rem; }
.difference-list li {
  padding: 0.6rem 0 0.6rem 2.2rem;
  border-bottom: 1px dashed var(--ink-soft);
  position: relative;
}
.difference-list li::before {
  content: "✔";
  position: absolute;
  left: 0.3rem;
  top: 0.6rem;
  color: var(--stamp);
  font-weight: 900;
}

.tag-list { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 0.6rem; }
.tag-list li {
  font-family: var(--font-type);
  font-weight: 700;
  background: var(--caution);
  border: 2px solid var(--ink);
  padding: 0.3em 0.8em;
}
.tag-list li:nth-child(odd) { transform: rotate(-1.5deg); }
.tag-list li:nth-child(even) { transform: rotate(1deg); background: var(--white); }

.sources-list { font-family: var(--font-type); font-size: 0.85rem; padding-left: 1.2rem; }
.sources-list li { margin-bottom: 0.3rem; }

#founder { border-left: 6px solid var(--caution); padding-left: 1.25rem; }
#about-links { display: flex; flex-wrap: wrap; gap: 0.6rem; }
#about-links a + a { margin-left: 0; }

body:has(#what-we-collect) main,
body:has(#accounts) main { max-width: 48rem; }
body:has(#what-we-collect) main > section,
body:has(#accounts) main > section { margin-bottom: 1.75rem; }
body:has(#what-we-collect) h2,
body:has(#accounts) h2 { background: none; font-size: 1.3rem; }

/* guidelines: do / don't */
main > section:has(> h2 + ul) ul { padding-left: 1.3rem; }

/* ---------- footer ---------- */
#site-footer {
  background: var(--ink);
  color: var(--paper);
  border-top: 6px solid var(--caution);
  padding: 2rem 1.25rem 2.5rem;
  font-family: var(--font-type);
  font-size: 0.88rem;
  text-align: center;
}
#site-footer ul {
  list-style: none;
  padding: 0;
  margin: 0 0 1.2rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.4rem 1.4rem;
}
#site-footer a { color: var(--caution); }
#site-footer p { margin: 0.3rem 0; opacity: 0.85; }

/* ---------- small screens ---------- */
@media (max-width: 640px) {
  #main-nav { flex-basis: 100%; order: 3; }
  #main-nav ul { gap: 0.3rem 0.9rem; }
  #main-nav a { font-size: 0.8rem; }
  #hero::after { display: none; }
  #hero-cta-shop { margin: 0.6rem 0 0; }
  #free-value li, .post:nth-of-type(even), .slideshow { transform: none; }
  .slide-prev { left: 0.3rem; }
  .slide-next { right: 0.3rem; }
  #signup, #verify, #login, #reset-request, #reset-confirm { padding: 1.4rem; box-shadow: var(--shadow); }
}

/* ---------- accounts & community (added with app.js) ---------- */
.form-message {
  font-family: var(--font-type);
  font-weight: 700;
  padding: 0.5rem 0.8rem;
  margin-top: 0.8rem;
  background: var(--caution);
  border: 2px solid var(--ink);
}
.form-message[role="alert"] { background: var(--stamp); color: var(--white); border-color: var(--stamp); }

.toast {
  position: fixed;
  left: 50%;
  bottom: 1.5rem;
  transform: translateX(-50%) rotate(-1deg);
  z-index: 100;
  background: var(--ink);
  color: var(--caution);
  font-family: var(--font-type);
  font-weight: 700;
  padding: 0.7rem 1.2rem;
  border: 3px solid var(--caution);
  box-shadow: 4px 4px 0 var(--caution);
  animation: toast-in 0.2s ease-out;
}
@keyframes toast-in { from { opacity: 0; transform: translateX(-50%) translateY(10px); } }

.staff-badge {
  font-family: var(--font-type);
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  background: var(--badge);
  color: var(--white);
  padding: 0 0.4em;
  margin-left: 0.4rem;
  vertical-align: 1px;
}
.comment-text { white-space: pre-wrap; overflow-wrap: anywhere; }
.comment-text.is-removed { font-style: italic; color: var(--ink-soft); }
.comment.is-highlighted { outline: 3px solid var(--caution); outline-offset: 2px; }
.comment-empty { font-style: italic; color: var(--ink-soft); padding: 1rem 0; }

.reply-form { margin: 0.8rem 0 0.4rem; }
.reply-form textarea { background: var(--white); }
.reply-buttons { display: flex; gap: 0.5rem; margin-top: 0.5rem; }
.reply-buttons button { font-size: 0.85rem; padding: 0.4em 0.9em; }
.reply-buttons .reply-cancel { background: var(--white); }

.feed-empty {
  border: 2px dashed var(--ink);
  padding: 1.5rem;
  text-align: center;
  font-weight: 600;
}
#feed-pagination { display: flex; justify-content: space-between; gap: 1rem; }
.post-image { width: 100%; border: 2px solid var(--ink); margin-bottom: 1rem; }
#post-image { margin: 0 0 1.5rem; }
#post-image img { width: 100%; border: 2px solid var(--ink); }
.read-more { font-family: var(--font-type); font-weight: 700; }

#comment-sort { width: auto; margin-left: 0.4rem; }
#comments > label[for="comment-sort"] { margin-left: 1rem; }

/* ---------- nav: "Shop SafeStore" stands out in yellow ---------- */
#main-nav a.nav-shop,
#main-nav a.nav-shop:hover,
#main-nav a.nav-shop:focus,
#main-nav a.nav-shop[aria-current="page"] { color: var(--caution) !important; }
#main-nav a.nav-shop:hover,
#main-nav a.nav-shop[aria-current="page"] { border-bottom-color: var(--caution); }

/* ---------- home: tagline strip under the ticker ---------- */
#tagline-strip {
  margin: 0;
  padding: 0.9rem 1.25rem 0.8rem;
  background: var(--ink);
  color: var(--paper);
  font-size: clamp(1.1rem, 3vw, 1.6rem);
  line-height: 1.2;
  text-align: center;
  letter-spacing: 0.02em;
  border-bottom: var(--line);
}

/* ---------- home: front page ---------- */
#front-page { margin-top: 1rem; }

#featured-story {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1.5rem;
  background: var(--white);
  border: var(--line);
  box-shadow: 8px 8px 0 var(--ink);
  padding: clamp(1rem, 3vw, 1.75rem);
  margin-bottom: 1.75rem;
}
@media (min-width: 860px) {
  #featured-story { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); align-items: center; }
  #featured-slideshow { grid-column: 1; grid-row: 1; }
  #featured-story .featured-text { grid-column: 2; grid-row: 1; }
  #featured-story.no-media { grid-template-columns: minmax(0, 1fr); }
  #featured-story.no-media .featured-text { grid-column: 1; }
}
#featured-slideshow { transform: none; box-shadow: var(--shadow); }
#featured-title {
  font-size: clamp(1.9rem, 4.5vw, 3rem);
  line-height: 1.02;
  text-transform: none;
  margin-bottom: 0.7rem;
  background: none;
}
#featured-title a { color: var(--ink); text-decoration: none; }
#featured-title a:hover { text-decoration: underline; text-decoration-color: var(--caution); text-decoration-thickness: 6px; }
#featured-summary { font-size: 1.15rem; color: var(--ink-soft); }

#top-headlines {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
}
@media (max-width: 900px) { #top-headlines { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) { #top-headlines { grid-template-columns: minmax(0, 1fr); } }
.headline-card {
  background: var(--white);
  border: var(--line);
  border-top: 8px solid var(--ink);
  padding: 0.9rem 1rem 0.8rem;
  box-shadow: var(--shadow-small);
  display: flex;
  flex-direction: column;
}
.headline-card .post-type { align-self: flex-start; font-size: 0.68rem; margin-bottom: 0.5rem; }
.headline-card h3 { font-size: 1.05rem; line-height: 1.2; margin-bottom: 0.6rem; }
.headline-card h3 a { color: var(--ink); text-decoration: none; }
.headline-card h3 a:hover { text-decoration: underline; text-decoration-color: var(--caution); text-decoration-thickness: 4px; }
.headline-card time { margin-top: auto; font-family: var(--font-type); font-size: 0.8rem; color: var(--ink-soft); }

/* ---------- home: category sectors ----------
   Title ------------------------------------
   description          | big 1 | big 2
   see all >            | s1 | s2 | s3 | s4          */
#sectors { margin-bottom: 3.5rem; }
.sector { margin-bottom: 3rem; }

.sector-title {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: clamp(1.35rem, 3vw, 1.9rem);
  text-transform: uppercase;
  background: none;
  margin-bottom: 1.1rem;
}
.sector-title::after {            /* the line running out to the right */
  content: "";
  flex: 1;
  height: 0;
  border-top: 4px solid var(--ink);
  box-shadow: 0 5px 0 var(--caution);
}

.sector-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1.25rem;
}
@media (min-width: 860px) {
  .sector-body { grid-template-columns: 250px minmax(0, 1fr); gap: 2rem; }
}

.sector-info { border-left: 6px solid var(--caution); padding-left: 1rem; }
.sector-desc { color: var(--ink-soft); font-size: 1rem; }
.sector-all {
  font-family: var(--font-type);
  font-weight: 700;
  text-transform: uppercase;
  font-size: 0.85rem;
  color: var(--ink);
  text-decoration-color: var(--caution);
  text-decoration-thickness: 3px;
}
.sector-all:hover { color: var(--stamp); }

.sector-big {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin-bottom: 1rem;
}
.sector-big-story {
  background: var(--white);
  border: var(--line);
  box-shadow: var(--shadow-small);
  padding: 0.9rem 1rem;
  display: flex;
  flex-direction: column;
}
.sector-photo { display: block; margin: -0.9rem -1rem 0.8rem; border-bottom: var(--line); }
.sector-photo img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.sector-big-story .post-type { align-self: flex-start; font-size: 0.68rem; margin-bottom: 0.5rem; }
.sector-big-story h3 { font-size: clamp(1.1rem, 2vw, 1.4rem); line-height: 1.15; margin-bottom: 0.6rem; }
.sector-big-story time { margin-top: auto; }

.sector-small {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.8rem;
}
.sector-small-story {
  border-top: 4px solid var(--ink);
  padding-top: 0.5rem;
  display: flex;
  flex-direction: column;
}
.sector-small-story h4 { font-family: var(--font-head); font-size: 0.95rem; line-height: 1.2; margin: 0 0 0.4rem; }
.sector-small-story time { margin-top: auto; }

.sector-big-story h3 a,
.sector-small-story h4 a { color: var(--ink); text-decoration: none; }
.sector-big-story h3 a:hover,
.sector-small-story h4 a:hover { text-decoration: underline; text-decoration-color: var(--caution); text-decoration-thickness: 4px; }
.sector-big-story time,
.sector-small-story time { font-family: var(--font-type); font-size: 0.78rem; color: var(--ink-soft); }

.sector-empty {
  border: 2px dashed var(--ink-soft);
  padding: 1.2rem;
  text-align: center;
  font-style: italic;
  color: var(--ink-soft);
  margin: 0;
}

@media (max-width: 700px) {
  .sector-small { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 460px) {
  .sector-big, .sector-small { grid-template-columns: minmax(0, 1fr); }
}

/* ---------- category page ---------- */
#category-header {
  border-bottom: var(--line);
  padding-bottom: 1rem;
  margin-bottom: 2rem;
}
#category-header h1 { font-size: clamp(2rem, 5vw, 3.2rem); }
#category-desc { font-size: 1.2rem; color: var(--ink-soft); max-width: 44rem; margin: 0; }
#category-pagination { display: flex; justify-content: space-between; gap: 1rem; font-family: var(--font-head); text-transform: uppercase; }
.sector-all { white-space: nowrap; }
.post-image { max-height: 380px; object-fit: cover; }

/* small headline picture segments */
.sector-thumb {
  display: block;
  aspect-ratio: 16 / 10;
  border: 2px solid var(--ink);
  margin-bottom: 0.55rem;
  overflow: hidden;
  background: var(--paper-dark);
}
.sector-thumb img { width: 100%; height: 100%; object-fit: cover; }
.sector-thumb.no-photo {     /* no photo on the post: a plain SafeStore block */
  background: repeating-linear-gradient(-45deg, var(--paper-dark) 0 10px, var(--paper) 10px 20px);
  display: grid;
  place-items: center;
}
.sector-thumb.no-photo::after { content: "▣"; font-size: 1.6rem; color: var(--ink-soft); opacity: 0.5; }
.sector-small-story { border-top: 0; padding-top: 0; }

/* more breathing room between and inside sections */
.sector { margin-bottom: 4.75rem; }
.sector-title { margin-bottom: 1.5rem; }
.sector-big { gap: 1.5rem; margin-bottom: 1.5rem; }
.sector-small { gap: 1.25rem; }
@media (min-width: 860px) { .sector-body { gap: 2.5rem; } }

/* big headlines: square (as tall as they are wide) */
.sector-big-story { aspect-ratio: 1 / 1; overflow: hidden; }
.sector-photo { flex: 1 1 auto; min-height: 0; overflow: hidden; }
.sector-photo img { width: 100%; height: 100%; aspect-ratio: auto; object-fit: cover; }
.sector-photo.no-photo {
  background: repeating-linear-gradient(-45deg, var(--paper-dark) 0 12px, var(--paper) 12px 24px);
  display: grid;
  place-items: center;
}
.sector-photo.no-photo::after { content: "▣"; font-size: 2.4rem; color: var(--ink-soft); opacity: 0.5; }
.sector-big-story time { margin-top: 0; }

/* ---------- news filters (category / location / date) ---------- */
#feed-filters {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 0.9rem 1rem;
  align-items: end;
}
#feed-filters .filter-field { display: flex; flex-direction: column; gap: 0.3rem; min-width: 0; }
#feed-filters .filter-field label {
  font-weight: 700;
  text-transform: uppercase;
  font-size: 0.75rem;
  margin: 0;
}
#feed-filters .filter-wide { grid-column: 1 / -1; }
#feed-filters select,
#feed-filters input[type="search"],
#feed-filters input[type="text"],
#feed-filters input[type="date"] {
  width: 100%;
  min-width: 0;
  background: var(--white);
}
#feed-filters .filter-buttons { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }
#filter-clear { font-family: var(--font-type); font-weight: 700; font-size: 0.85rem; color: var(--ink); }
.post-category { font-weight: 700; color: var(--ink); text-decoration-color: var(--caution); }
.post-event-date { font-weight: 700; }
input[type="date"] {
  font: inherit;
  font-family: var(--font-type);
  font-size: 1rem;
  color: var(--ink);
  background: var(--paper);
  border: var(--line);
  border-radius: 0;
  padding: 0.55em 0.6em;
}
#feed-filters .filter-field label { min-height: 1.2em; }
