/*
Theme Name:  USACR Modern
Theme URI:   https://usacryptoreports.com
Description: Design layer for USA Crypto Reports. Direction: "Wayfinding" — the visual
             language of finding a physical place in a city. Works on top of any parent
             theme; set Template: below to whatever parent you activate.
Author:      USA Crypto Reports
Version:     1.0.0
Template:    kadence
Text Domain: usacr-modern
*/

/* ===========================================================================
   DESIGN DIRECTION — Wayfinding

   The subject is not "crypto." The subject is physical retail infrastructure:
   bodegas, gas stations, laundromats, 24-hour delis. Someone is standing on a
   sidewalk trying to find a machine. So the reference is civic wayfinding and
   transit signage — high contrast, legible at arm's length in daylight, dense
   information handled calmly.

   Deliberately NOT: dark navy, neon cyan, glowing coins, gradient meshes.
   That's the crypto default and it's on every competitor.

   SIGNATURE: coordinates and costs render as monospace data — addresses,
   distances, fees, spreads, phone numbers. A departure board, not body copy.
   It encodes something true: this site is about where things are and what
   they cost.
   ======================================================================== */

:root {
  /* Ink ------------------------------------------------------------------ */
  --ink:        #16181D;   /* near-black, warm-neutral, never pure #000 */
  --ink-2:      #4A4E57;   /* secondary copy */
  --ink-3:      #7B8089;   /* metadata, captions */

  /* Paper ---------------------------------------------------------------- */
  --paper:      #FFFFFF;
  --paper-2:    #F6F5F2;   /* newsprint band for alternating sections */
  --paper-3:    #EDEBE5;   /* pressed / active */

  /* Rules ---------------------------------------------------------------- */
  --rule:       #E3E1DC;
  --rule-2:     #C9C6BE;

  /* Signal — interstate/transit sign blue. Navigation and links only. ----- */
  --signal:     #0B4F9E;
  --signal-2:   #073A76;
  --signal-wash:#E8F0FA;

  /* Open — the "open now" green. Availability states only. --------------- */
  --open:       #127A4B;
  --open-wash:  #E6F3EC;

  /* Cost — reserved for fees, spreads, and price warnings. Nothing else.
     If this color appears somewhere that isn't about money, it's misused. - */
  --cost:       #B3341E;
  --cost-wash:  #FBEDEA;

  /* Type ----------------------------------------------------------------- */
  --font-display: 'Archivo', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-body:    'Source Serif 4', Georgia, 'Times New Roman', serif;
  --font-data:    'IBM Plex Mono', ui-monospace, 'SF Mono', Menlo, monospace;

  /* Scale — 1.25 modular, rounded to whole px --------------------------- */
  --t-xs:   13px;
  --t-sm:   15px;
  --t-base: 17px;
  --t-md:   21px;
  --t-lg:   27px;
  --t-xl:   34px;
  --t-2xl:  44px;

  /* Rhythm — 8px base ---------------------------------------------------- */
  --s-1: 4px;   --s-2: 8px;   --s-3: 12px;  --s-4: 16px;
  --s-5: 24px;  --s-6: 32px;  --s-7: 48px;  --s-8: 64px;  --s-9: 96px;

  --radius:    6px;
  --radius-lg: 10px;
  --measure:   68ch;   /* reading measure — the single most important number */
}

/* ===========================================================================
   Reset the parent theme's worst habits
   ======================================================================== */

body,
.td-main-content,
.entry-content,
article {
  font-family: var(--font-body);
  font-size: var(--t-base);
  line-height: 1.65;
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4, h5, h6,
.entry-title, .td-module-title {
  font-family: var(--font-display);
  color: var(--ink);
  letter-spacing: -0.014em;
  line-height: 1.15;
  font-weight: 600;
  margin-top: var(--s-7);
  margin-bottom: var(--s-3);
  text-wrap: balance;
}

h1, .entry-title { font-size: var(--t-2xl); margin-top: 0; letter-spacing: -0.022em; }
h2 { font-size: var(--t-xl); }
h3 { font-size: var(--t-lg); }
h4 { font-size: var(--t-md); }

/* First heading after the hero shouldn't punch a hole in the layout */
.entry-content > h2:first-child,
.entry-content > h3:first-child { margin-top: 0; }

p { margin: 0 0 var(--s-4); max-width: var(--measure); }

.entry-content > p:first-of-type {
  font-size: var(--t-md);
  line-height: 1.55;
  color: var(--ink-2);
}

a { color: var(--signal); text-decoration: none; }
.entry-content a {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  text-decoration-color: var(--rule-2);
}
.entry-content a:hover { text-decoration-color: var(--signal); }

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 2px solid var(--signal);
  outline-offset: 2px;
  border-radius: 2px;
}

/* Kill the bold-keyword-spam the old AI content is full of.
   Bold should mean something. */
.entry-content strong { font-weight: 600; color: var(--ink); }

img { max-width: 100%; height: auto; display: block; }

figure { margin: var(--s-7) 0; }
figure img { border-radius: var(--radius-lg); }
figcaption {
  font-family: var(--font-display);
  font-size: var(--t-xs);
  color: var(--ink-3);
  margin-top: var(--s-2);
  padding-left: var(--s-3);
  border-left: 2px solid var(--rule-2);
}

/* ===========================================================================
   SIGNATURE — the data board
   Coordinates and costs are not prose. They get monospace, tighter leading,
   and tabular figures so columns of them line up.
   ======================================================================== */

.usacr-data,
.atm-address,
.atm-distance,
.atm-phone,
.atm-fee,
.usacr-nap {
  font-family: var(--font-data);
  font-variant-numeric: tabular-nums;
  font-feature-settings: 'tnum' 1;
  letter-spacing: -0.01em;
  line-height: 1.4;
}

.atm-distance {
  font-size: var(--t-md);
  font-weight: 600;
  color: var(--ink);
}

.atm-address {
  font-size: var(--t-sm);
  color: var(--ink-2);
}

.atm-fee {
  font-size: var(--t-sm);
  font-weight: 600;
  color: var(--cost);
}

/* The NAP block on a listing page — reads as a plate, not a paragraph */
.usacr-nap {
  background: var(--paper-2);
  border-left: 3px solid var(--signal);
  border-radius: 0;             /* single-sided border: never round it */
  padding: var(--s-4) var(--s-5);
  margin: var(--s-6) 0;
  font-size: var(--t-sm);
}
.usacr-nap dt {
  font-family: var(--font-display);
  font-size: var(--t-xs);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-3);
  margin-top: var(--s-3);
}
.usacr-nap dt:first-child { margin-top: 0; }
.usacr-nap dd { margin: 2px 0 0; color: var(--ink); }

/* ===========================================================================
   Listing cards
   ======================================================================== */

.atm-card {
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: var(--radius-lg);
  padding: var(--s-4) var(--s-5);
  margin-bottom: var(--s-3);
  position: relative;
  transition: border-color 120ms ease;
}
.atm-card:hover { border-color: var(--rule-2); }

.atm-card__name {
  font-family: var(--font-display);
  font-size: var(--t-md);
  font-weight: 600;
  color: var(--ink);
  display: block;
  padding-right: 88px;
  letter-spacing: -0.012em;
}
.atm-card__name:hover { color: var(--signal); }

.atm-card .atm-distance {
  position: absolute;
  top: var(--s-4);
  right: var(--s-5);
}

/* Status chips — color carries meaning, so there are only three */
.atm-chip {
  font-family: var(--font-display);
  font-size: var(--t-xs);
  font-weight: 500;
  padding: 3px 10px;
  border-radius: var(--radius);
  display: inline-block;
  margin: var(--s-3) var(--s-1) 0 0;
  background: var(--paper-3);
  color: var(--ink-2);
}
.atm-chip--open  { background: var(--open-wash);   color: var(--open); }
.atm-chip--mode  { background: var(--signal-wash); color: var(--signal-2); }
.atm-chip--fee   { background: var(--cost-wash);   color: var(--cost); }

/* ===========================================================================
   Article furniture
   ======================================================================== */

.usacr-eyebrow {
  font-family: var(--font-display);
  font-size: var(--t-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--signal);
  display: block;
  margin-bottom: var(--s-3);
}

.usacr-byline {
  font-family: var(--font-display);
  font-size: var(--t-sm);
  color: var(--ink-3);
  display: flex;
  align-items: center;
  gap: var(--s-3);
  padding: var(--s-4) 0;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  margin: var(--s-5) 0 var(--s-7);
}
.usacr-byline img { width: 36px; height: 36px; border-radius: 50%; }
.usacr-byline a { color: var(--ink); font-weight: 500; }
.usacr-byline time { font-family: var(--font-data); font-size: var(--t-xs); }

.usacr-readtime::before { content: "·"; margin-right: var(--s-3); color: var(--rule-2); }

blockquote {
  font-family: var(--font-body);
  font-size: var(--t-md);
  font-style: italic;
  color: var(--ink-2);
  border-left: 3px solid var(--signal);
  border-radius: 0;
  margin: var(--s-7) 0;
  padding: 0 0 0 var(--s-5);
  max-width: var(--measure);
}
blockquote cite {
  display: block;
  font-family: var(--font-display);
  font-style: normal;
  font-size: var(--t-xs);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-3);
  margin-top: var(--s-3);
}

hr {
  border: 0;
  border-top: 1px solid var(--rule);
  margin: var(--s-8) 0;
}

/* Tables — the WFU search-operator tables live here, so they matter */
table {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--font-data);
  font-size: var(--t-sm);
  margin: var(--s-6) 0;
}
th {
  font-family: var(--font-display);
  font-size: var(--t-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  text-align: left;
  color: var(--ink-3);
  padding: var(--s-3);
  border-bottom: 2px solid var(--rule-2);
}
td { padding: var(--s-3); border-bottom: 1px solid var(--rule); }
tbody tr:hover { background: var(--paper-2); }

/* ===========================================================================
   Glossary and entity pages
   ======================================================================== */

.usacr-term {
  padding: var(--s-5) 0;
  border-bottom: 1px solid var(--rule);
  max-width: var(--measure);
}
.usacr-term__name {
  font-family: var(--font-display);
  font-size: var(--t-md);
  font-weight: 600;
  color: var(--ink);
  margin-bottom: var(--s-2);
}
.usacr-term__def { color: var(--ink-2); font-size: var(--t-sm); }

/* ===========================================================================
   Buttons
   ======================================================================== */

.usacr-btn {
  font-family: var(--font-display);
  font-size: var(--t-sm);
  font-weight: 500;
  padding: 10px 20px;
  border-radius: var(--radius);
  border: 1px solid var(--rule-2);
  background: var(--paper);
  color: var(--ink);
  cursor: pointer;
  display: inline-block;
  transition: background 120ms ease, border-color 120ms ease;
}
.usacr-btn:hover { background: var(--paper-2); border-color: var(--ink-3); }
.usacr-btn:active { background: var(--paper-3); }

/* One primary per view. If there are two, one of them isn't primary. */
.usacr-btn--primary {
  background: var(--signal);
  border-color: var(--signal);
  color: #fff;
}
.usacr-btn--primary:hover { background: var(--signal-2); border-color: var(--signal-2); }

/* Claim-listing CTA — the conversion driver on every listing */
.usacr-claim {
  background: var(--paper-2);
  border: 1px solid var(--rule);
  border-radius: var(--radius-lg);
  padding: var(--s-5);
  margin: var(--s-7) 0;
}
.usacr-claim h3 {
  font-size: var(--t-md);
  margin: 0 0 var(--s-2);
}
.usacr-claim p {
  font-size: var(--t-sm);
  color: var(--ink-2);
  margin-bottom: var(--s-4);
}

/* ===========================================================================
   Footer — the current one is eight dead links and a fake phone number.
   Structure it so that can't happen again.
   ======================================================================== */

.usacr-footer {
  background: var(--paper-2);
  border-top: 1px solid var(--rule);
  padding: var(--s-8) var(--s-5) var(--s-6);
  margin-top: var(--s-9);
}
.usacr-footer__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: var(--s-6);
  max-width: 1100px;
  margin: 0 auto;
}
.usacr-footer h4 {
  font-family: var(--font-display);
  font-size: var(--t-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--ink-3);
  margin: 0 0 var(--s-3);
}
.usacr-footer ul { list-style: none; padding: 0; margin: 0; }
.usacr-footer li { margin-bottom: var(--s-2); }
.usacr-footer a { font-family: var(--font-display); font-size: var(--t-sm); color: var(--ink-2); }
.usacr-footer a:hover { color: var(--signal); }
.usacr-footer .usacr-nap { background: none; border: 0; padding: 0; margin: 0; }

/* Any link that still points nowhere gets flagged in the browser.
   Cheap, permanent guard against the current state of the footer. */
.usacr-footer a[href="#"],
.usacr-footer a[href=""] {
  outline: 2px dashed var(--cost);
  outline-offset: 2px;
}
.usacr-footer a[href="#"]::after { content: " ← dead link"; color: var(--cost); font-size: var(--t-xs); }

/* ===========================================================================
   Responsive
   ======================================================================== */

@media (max-width: 900px) {
  :root { --t-2xl: 34px; --t-xl: 27px; --t-lg: 21px; }
}

@media (max-width: 600px) {
  :root { --t-2xl: 29px; --t-xl: 23px; --t-base: 17px; }
  .atm-card { padding: var(--s-4); }
  .atm-card__name { padding-right: 0; font-size: var(--t-sm); }
  .atm-card .atm-distance { position: static; display: block; margin-top: var(--s-2); }
  .usacr-footer { padding: var(--s-6) var(--s-4); }
  h2, h3 { margin-top: var(--s-6); }
}

/* ===========================================================================
   Quality floor
   ======================================================================== */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

@media print {
  .usacr-footer, nav, .atm-chip, .usacr-claim { display: none; }
  body { font-size: 11pt; color: #000; }
  a::after { content: " (" attr(href) ")"; font-size: 9pt; }
}

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

/* Compact byline — used on the homepage lead where the avatar is redundant */
.usacr-byline.is-compact {
  border: 0;
  padding: 0;
  margin: 0;
  font-size: var(--t-xs);
}
