/* ============================================================
   SwiftLife — Is it a scam? (/scams/)
   Sits on the placeholder's sheet (placeholder/placeholder.css):
   its paper, type and colours. Here: the search box, the answer,
   the scam cards and the four signs. One red of its own for
   "scam"; "do this" borrows the Contact tile's green.
   ============================================================ */

:root {
  --scam: #a3271c; --scam-tint: rgba(163, 39, 28, .055); --scam-line: rgba(163, 39, 28, .3);
  --do: var(--mail); --do-tint: var(--mail-tint);
}
/* Dark, written twice like the placeholder's: the system's choice, or
   the visitor's own pick with the toggle. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) { --scam: #ff9e8a; --scam-tint: rgba(255, 158, 138, .085); --scam-line: rgba(255, 158, 138, .34); }
}
:root[data-theme="dark"] { --scam: #ff9e8a; --scam-tint: rgba(255, 158, 138, .085); --scam-line: rgba(255, 158, 138, .34); }

.stage-scams { display: block; padding: 26px 0 8px; }
.sc { max-width: 46rem; margin: 0 auto; }
.sc a { color: var(--link); text-underline-offset: 2px; }
.sc a:hover { color: var(--link-2); }
.sc [hidden] { display: none !important; }

.sc-hero .lede { max-width: 44ch; }
.sc .emilia { max-width: none; margin-top: 22px; }

/* A small label in the dateline's voice. */
.sc-find label, .sc-try > span, .sc-stamp, .sc-kick, .sc-do b, .sc-aka b, .sc-body h4, .sc-kind > h3 {
  font: 500 .6875rem/1.35 var(--mono); letter-spacing: .12em; text-transform: uppercase;
}

/* ---- the search ---- */
.sc-find { margin-top: 26px; }
.sc-find label { display: block; margin: 0 2px 9px; font-size: .75rem; color: var(--ink-2); }
.sc-field { position: relative; }
.sc-glass {
  position: absolute; left: 17px; top: 50%; width: 22px; height: 22px; margin-top: -11px;
  color: var(--ink-3); pointer-events: none;
}
#sc-q {
  display: block; width: 100%; height: 62px; margin: 0; padding: 0 56px 0 51px;
  border: 1.5px solid var(--rule-2); border-radius: 16px;
  background: var(--card); color: var(--ink); box-shadow: var(--shadow);
  font: 400 1.125rem/1.3 var(--sans);
  -webkit-appearance: none; appearance: none;
  transition: border-color .2s ease;
}
#sc-q::placeholder { color: var(--ink-3); opacity: .85; }
#sc-q::-webkit-search-cancel-button, #sc-q::-webkit-search-decoration { -webkit-appearance: none; display: none; }
#sc-q:hover { border-color: var(--ink-3); }
#sc-q:focus { border-color: var(--focus); outline: 3px solid var(--line-soft); outline-offset: 0; }
.sc-clear {
  position: absolute; right: 9px; top: 9px; width: 44px; height: 44px; padding: 0;
  display: grid; place-items: center;
  border: 0; border-radius: 50%; background: transparent; color: var(--ink-3); cursor: pointer;
}
.sc-clear:hover { background: var(--cream); color: var(--ink); }
.sc-clear svg { width: 20px; height: 20px; }
.sc-private {
  display: flex; align-items: flex-start; gap: .6em; margin: 11px 2px 0;
  font: 400 .75rem/1.5 var(--mono); color: var(--ink-3);
}
.sc-private svg { flex: none; width: 14px; height: 14px; margin-top: 2px; }
.sc-try { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 16px 0 0; }
.sc-try > span { margin: 0 4px 0 2px; color: var(--ink-3); }
.sc-eg {
  min-height: 40px; padding: 0 14px;
  border: 1px solid var(--rule-2); border-radius: 999px;
  background: var(--card); color: var(--ink-2); cursor: pointer;
  font: 500 .875rem/1 var(--sans);
  -webkit-tap-highlight-color: transparent;
  transition: border-color .2s ease, color .2s ease;
}
.sc-eg:hover { border-color: var(--link); color: var(--link); }
.sc-noscript {
  margin: 22px 0 0; padding: 11px 14px;
  border: 1px solid var(--rule-2); border-radius: 10px; background: var(--cream);
  font-size: .9375rem; color: var(--ink-2);
}

/* ---- the answer ---- */
.sc-answer { margin-top: 28px; scroll-margin-top: 16px; }
.sc-hit, .sc-miss {
  padding: 18px 18px 17px;
  border: 1px solid var(--scam-line); border-radius: 16px; background: var(--scam-tint);
}
.sc-miss { border-color: var(--rule-2); background: var(--cream); }
/* The verdict, rubber-stamped a little off square. */
.sc-stamp {
  display: inline-block; margin: 0; padding: 6px 11px 5px;
  border: 2px solid var(--scam); border-radius: 6px;
  font-size: .8125rem; line-height: 1.2; color: var(--scam);
  transform: rotate(-1.6deg); transform-origin: 0 100%;
}
.sc-miss .sc-stamp { border-color: var(--ink-3); color: var(--ink-2); }
.sc-say { margin: 13px 0 0; font-size: 1.0625rem; line-height: 1.5; color: var(--ink); }
.sc-hit .sc-say strong { font-weight: 650; color: var(--scam); }
.sc-miss .sc-say strong { font-weight: 650; }
.sc-fix { margin: 9px 0 0; font: 400 .75rem/1.5 var(--mono); color: var(--ink-3); }

/* ---- the cards ---- */
.sc-list { display: grid; gap: 10px; }
.sc-found { margin-top: 14px; }
.sc-card {
  min-width: 0;
  background: var(--card); border: 1px solid var(--rule); border-radius: 14px; box-shadow: var(--shadow);
  scroll-margin-top: 16px;
  transition: border-color .2s ease;
}
.sc-card:hover, .sc-card[open] { border-color: var(--rule-2); }
.sc-card > summary {
  position: relative; display: block; padding: 14px 50px 14px 16px;
  border-radius: 13px; cursor: pointer; list-style: none;
  -webkit-tap-highlight-color: transparent;
}
.sc-card > summary::-webkit-details-marker { display: none; }
.sc-card > summary:focus-visible { outline-offset: 2px; }
.sc-name { display: block; font: 600 1.0625rem/1.3 var(--sans); letter-spacing: -.005em; color: var(--ink); }
.sc-sum { display: block; margin-top: 4px; font-size: .9375rem; line-height: 1.5; color: var(--ink-2); }
.sc-kick, .sc-do { display: none; }
/* The chevron, drawn here rather than sent 150 times. */
.sc-card > summary::after {
  content: ""; position: absolute; right: 21px; top: 19px; width: 8px; height: 8px;
  border: solid var(--ink-3); border-width: 0 1.8px 1.8px 0;
  transform: rotate(45deg);
  transition: transform .25s cubic-bezier(.2, .7, .2, 1), border-color .2s ease;
}
.sc-card[open] > summary::after { transform: translateY(4px) rotate(-135deg); }
.sc-card > summary:hover::after { border-color: var(--ink); }

/* A match: says so, says its kind, and gives the first thing to do
   before the card is even opened. */
.sc-results .sc-card { border-color: var(--scam-line); }
.sc-results .sc-kick { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 12px; margin-bottom: 7px; }
.sc-kick b { font-weight: 500; color: var(--scam); }
.sc-kick i { font-style: normal; color: var(--ink-3); }
.sc-results .sc-card:not([open]) .sc-do {
  display: block; margin-top: 11px; padding: 10px 12px;
  border-radius: 10px; background: var(--do-tint);
  font-size: .9375rem; line-height: 1.5; color: var(--ink);
}
.sc-do b { display: block; margin-bottom: 2px; font-weight: 500; color: var(--do); }
/* The closest match speaks up. */
.sc-results .sc-card:first-child .sc-name {
  font: 400 1.5rem/1.18 var(--serif); letter-spacing: -.018em;
}
.sc-results .sc-card:first-child .sc-sum { margin-top: 7px; font-size: 1rem; color: var(--ink); }
.sc-results .sc-card:first-child > summary { padding-top: 16px; padding-bottom: 16px; }

.sc-body { padding: 0 16px 18px; border-top: 1px dashed var(--rule-2); }
.sc-body h4 { margin: 20px 0 8px; color: var(--ink-3); }
.sc-aka { margin: 16px 0 0; font-size: .875rem; line-height: 1.5; color: var(--ink-2); }
.sc-aka b { display: block; margin-bottom: 3px; font-weight: 500; color: var(--ink-3); }
.sc-how { margin: 0; line-height: 1.6; }
.sc-cols { display: grid; gap: 0 30px; }
.sc-cols > div { min-width: 0; }
.sc-body ul { margin: 0; padding: 0; list-style: none; }
.sc-body li { position: relative; margin-top: 7px; padding-left: 19px; font-size: .9375rem; line-height: 1.5; overflow-wrap: anywhere; }
.sc-body li:first-child { margin-top: 0; }
.sc-body li::before {
  content: ""; position: absolute; left: 2px; top: .56em; width: 7px; height: 7px;
  border-radius: 2px; background: var(--ink-3);
}
.sc-signs h4 { color: var(--scam); }
.sc-signs li::before { border-radius: 50%; background: var(--scam); }
.sc-todo h4 { color: var(--do); }
.sc-todo li::before { background: var(--do); }
.sc-src { margin: 20px 0 0; font: 400 .75rem/1.7 var(--mono); color: var(--ink-3); overflow-wrap: anywhere; }

.sc-tools { display: flex; flex-wrap: wrap; gap: 10px; margin: 16px 0 0; }
.sc-btn {
  min-height: 44px; padding: 0 18px;
  border: 1px solid var(--link); border-radius: 11px;
  background: var(--link); color: var(--on-link); cursor: pointer;
  font: 600 .9375rem/1 var(--sans);
  transition: background-color .2s ease, border-color .2s ease, color .2s ease;
}
.sc-btn:hover { background: var(--link-2); border-color: var(--link-2); }
.sc-btn-quiet { border-color: var(--rule-2); background: transparent; color: var(--ink); }
.sc-btn-quiet:hover { border-color: var(--rule-2); background: var(--cream); }

/* ---- everything, by kind ---- */
.sc-h {
  margin: 52px 0 0;
  font: 360 clamp(1.625rem, 1.3rem + 1.4vw, 2.125rem)/1.12 var(--serif); letter-spacing: -.022em;
  text-wrap: balance;
}
.sc-kinds { display: flex; flex-wrap: wrap; gap: 8px; margin: 18px 0 0; }
.sc-kinds a {
  display: inline-flex; align-items: center; gap: 9px; min-height: 40px; padding: 0 14px;
  border: 1px solid var(--rule-2); border-radius: 999px; background: var(--card);
  color: var(--ink-2); text-decoration: none; font: 500 .875rem/1.2 var(--sans);
  transition: border-color .2s ease, color .2s ease;
}
.sc-kinds a span, .sc-kind > h3 span { font: 500 .6875rem/1 var(--mono); letter-spacing: .04em; color: var(--ink-3); }
.sc-kinds a:hover { border-color: var(--link); color: var(--link); }
.sc-kind { margin-top: 38px; scroll-margin-top: 16px; }
.sc-kind > h3 { display: flex; align-items: center; gap: 10px; margin: 0 0 13px; font-size: .75rem; color: var(--ink-2); }
.sc-kind > h3::after { content: ""; flex: 1; min-width: 20px; height: 1px; background: var(--rule-2); }

/* ---- the four signs ---- */
.sc-four { scroll-margin-top: 16px; }
.sc-four ol { display: grid; gap: 12px; margin: 20px 0 0; padding: 0; list-style: none; counter-reset: sign; }
.sc-four li {
  position: relative; min-width: 0; padding: 16px 16px 16px 56px; counter-increment: sign;
  background: var(--card); border: 1px solid var(--rule); border-radius: 14px; box-shadow: var(--shadow);
  font-size: .9375rem; line-height: 1.55; color: var(--ink-2);
}
.sc-four li::before {
  content: counter(sign); position: absolute; left: 16px; top: 15px;
  display: grid; place-items: center; width: 27px; height: 27px;
  border: 1.5px solid var(--scam); border-radius: 50%;
  font: 500 .8125rem/1 var(--mono); color: var(--scam);
}
.sc-four strong { display: block; margin-bottom: 3px; font-size: 1rem; font-weight: 600; line-height: 1.35; color: var(--ink); }
.sc-fine { margin: 16px 0 0; font-size: .875rem; line-height: 1.6; color: var(--ink-2); }
.sc-foot { margin-top: 40px; padding-top: 20px; border-top: 1px solid var(--rule); }
.sc-foot p { margin: 0 0 10px; max-width: 62ch; font-size: .875rem; line-height: 1.6; color: var(--ink-2); }

@media (min-width: 640px) {
  .stage-scams { padding-top: 40px; }
  .sc-cols { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sc-four ol { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sc-card > summary { padding-left: 20px; }
  .sc-body { padding-left: 20px; padding-right: 20px; }
  .sc-hit, .sc-miss { padding: 22px 22px 20px; }
}

@keyframes sc-in { from { opacity: 0; transform: translateY(6px); } }
@media (prefers-reduced-motion: no-preference) {
  .sc-answer > div { animation: sc-in .3s cubic-bezier(.2, .7, .2, 1) both; }
}
@media (prefers-reduced-motion: reduce) {
  .sc-card > summary::after, .sc-card, #sc-q { transition: none; }
}
