/* JoseLuisRodriguezJr.com — site.css (shared by every page)
 * Version: 2.4.0
 * 2.4.0: search bar on every page (drop-down and full results page), copy
 *        boxes, credit lines for saved copies, tags on referral cards, and
 *        a highlight on the entry a search result jumps to.
 * 2.3.0: Links page (jump menu, link cards, platform tags, h3), and a lone
 *        last home button spans the full row on wide screens.
 * 2.2.0: referral cards show the offer and the scan report link.
 * 2.1.0: placeholder (disabled) button style.
 * 2.0.0: dark grey theme on every page (background #151515), buttons,
 *        breadcrumbs, app header and the shared footer.
 */

:root {
  color-scheme: dark;
  --bg: #151515;
  --surface: #1f1f1e;
  --surface-hover: #292928;
  --line: #323231;
  --heading: #f0efec;
  --text: #e6e5e2;
  --muted: #a3a29e;
  --accent: #5cbcd8;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

html { background: var(--bg); }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 17px/1.6 -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  padding: 40px 20px 56px;
  -webkit-text-size-adjust: 100%;
}

main { max-width: 680px; margin: 0 auto; }

h1, h2 { color: var(--heading); }
h1 { font-size: clamp(26px, 7vw, 32px); line-height: 1.2; margin: 0 0 8px; }
h2 { font-size: 20px; margin: 36px 0 10px; }
p, li { margin: 0 0 12px; }
ul { padding-left: 22px; margin: 0 0 12px; }
a { color: var(--accent); }
a:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
.muted { color: var(--muted); }
.lede { color: var(--muted); margin-bottom: 28px; }

/* Breadcrumbs */
.crumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 8px;
  margin: 0 0 28px;
  font-size: 14px;
  color: var(--muted);
}
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--text); text-decoration: underline; }
.crumbs .sep { color: var(--line); }
.crumbs [aria-current="page"] { color: var(--text); }

/* Buttons */
.buttons { display: grid; gap: 12px; margin: 28px 0 0; }
@media (min-width: 560px) {
  .buttons.two { grid-template-columns: 1fr 1fr; }
  .buttons.two > .button:last-child:nth-child(odd) { grid-column: 1 / -1; }
}
.button {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  color: var(--heading);
  font-weight: 600;
  text-decoration: none;
  transition: background-color 0.15s ease;
}
.button:hover { background: var(--surface-hover); }
.button::after { content: "\203A"; margin-left: auto; color: var(--muted); font-size: 24px; line-height: 1; }
.button .sub { display: block; color: var(--muted); font-size: 14px; font-weight: 400; }
.button img { width: 56px; height: 56px; flex: none; }
.button.disabled { color: var(--muted); cursor: default; }
.button.disabled:hover { background: var(--surface); }
.button.disabled::after { content: none; }

/* App page header */
.app-head { display: flex; align-items: center; gap: 18px; margin: 0 0 24px; }
.app-head img { width: 96px; height: 96px; flex: none; }
.app-head h1 { margin: 0 0 2px; }
.app-head p { margin: 0; color: var(--muted); }

/* Privacy policy */
.date { color: var(--muted); margin-bottom: 28px; }

/* Boxed notes (policy summary, referral disclosure) */
.summary,
.note {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 16px 18px;
  margin: 0 0 8px;
}
.summary p,
.note p { margin: 0; }
.note { font-size: 16px; }
.note p + p { margin-top: 10px; }

/* Referral list */
.refs { list-style: none; padding: 0; }
.refs li {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px 16px;
  margin: 0 0 10px;
}
.refs .ref-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: baseline;
  gap: 2px 12px;
}
.refs .name { font-weight: 600; text-decoration: none; }
.refs .code { color: var(--muted); font-size: 15px; }
.refs .host {
  display: block;
  color: var(--muted);
  font-size: 13px;
  overflow-wrap: anywhere;
}
.refs .offer { margin: 8px 0 0; font-size: 15px; line-height: 1.5; }
.refs .offer strong { color: var(--heading); }
.refs .scan { margin: 6px 0 0; color: var(--muted); font-size: 13px; line-height: 1.5; }
.fine { color: var(--muted); font-size: 13px; margin-top: 20px; }
code { color: var(--muted); font-size: 15px; }
.refs .host {
  flex-basis: 100%;
  order: 3;
  color: var(--muted);
  font-size: 13px;
  overflow-wrap: anywhere;
}
code {
  font: 15px ui-monospace, SFMono-Regular, Menlo, monospace;
  color: var(--heading);
  -webkit-user-select: all;
  user-select: all;
}

/* Links page */
h3 { color: var(--heading); font-size: 17px; margin: 26px 0 8px; }
section { scroll-margin-top: 16px; }
.section-note,
.group-note { color: var(--muted); font-size: 15px; line-height: 1.5; margin: 0 0 10px; }
.toc {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  list-style: none;
  padding: 0;
  margin: 0 0 8px;
}
.toc li { margin: 0; }
.toc a {
  display: inline-block;
  padding: 6px 12px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--text);
  font-size: 14px;
  line-height: 1.4;
  text-decoration: none;
}
.toc a:hover { background: var(--surface-hover); }
.links { list-style: none; padding: 0; margin: 0 0 8px; }
.links li {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px 16px;
  margin: 0 0 8px;
}
.links .name { font-weight: 600; text-decoration: none; overflow-wrap: anywhere; }
.links .host {
  display: block;
  color: var(--muted);
  font-size: 13px;
  overflow-wrap: anywhere;
}
.links .desc { margin: 6px 0 0; font-size: 15px; line-height: 1.5; }
.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 8px 0 0;
}
.tags span {
  padding: 1px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}
.group-tags { margin: -2px 0 10px; }

/* Entries a search result or link jumps to */
.links li[id],
.refs li[id] { scroll-margin-top: 16px; }
.links li:target,
.refs li:target { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.credit { margin: 6px 0 0; color: var(--muted); font-size: 13px; line-height: 1.5; }

/* Search bar (top of every page) */
.topbar { max-width: 680px; margin: -16px auto 24px; }
.site-search { position: relative; margin: 0; }
.search-input {
  display: block;
  width: 100%;
  margin: 0;
  padding: 10px 14px 10px 38px;
  background: var(--surface) url("/assets/search-icon.svg") no-repeat 13px center / 16px 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--text);
  font: 16px/1.4 -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  -webkit-appearance: none;
  appearance: none;
}
.search-input::placeholder { color: var(--muted); opacity: 1; }
.search-input:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.search-menu {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 6px);
  z-index: 20;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.5);
  overflow: hidden;
}
.search-menu .opt {
  display: block;
  padding: 10px 14px;
  border-top: 1px solid var(--line);
  color: var(--text);
  text-decoration: none;
}
.search-menu > :first-child { border-top: 0; }
.search-menu .opt.active,
.search-menu .opt:hover { background: var(--surface-hover); }
.opt-title,
.opt-meta { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.opt-title { color: var(--heading); font-weight: 600; font-size: 15px; line-height: 1.35; }
.opt-meta { color: var(--muted); font-size: 13px; line-height: 1.4; }
.search-menu .opt-action { padding: 8px 14px; color: var(--accent); font-size: 14px; }
.opt-empty { padding: 10px 14px; color: var(--muted); font-size: 14px; }
.browse-all { color: var(--muted); font-size: 14px; }

/* Full results page */
.search-scope { color: var(--muted); font-size: 15px; margin: -16px 0 20px; }
.result-list { margin-top: 8px; }

/* Copy boxes: one click selects the code; with scripts on, a tap copies it */
.code-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 10px;
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 14px;
}
.copy-box {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 4px 10px;
  background: var(--bg);
  border: 1px dashed var(--muted);
  border-radius: 8px;
}
.copy-box.copy-ready { border-style: solid; border-color: var(--line); cursor: pointer; }
.copy-box.copy-ready:hover { background: var(--surface-hover); }
.copy-box:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.copy-hint { color: var(--accent); font-size: 12px; font-weight: 600; letter-spacing: 0.02em; }
.copy-box.copied .copy-hint { color: var(--heading); }
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* Footer: copyright, contact, privacy */
footer {
  max-width: 680px;
  margin: 56px auto 0;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}
footer p { margin: 0 0 6px; }
footer a { color: var(--muted); }
