/* findmytesla.com — public site
 * Designed to layer on top of Pico CSS dark theme.
 * Color palette intentionally close to the BG-Dash app:
 *   - Red accent (Tesla brand cue) for primary CTAs
 *   - Muted slate for cards
 *   - Warning amber + success green for charging tiers
 */

:root {
  --fmt-accent: #e31937;        /* Tesla-red */
  --fmt-accent-dim: #b3142c;
  --fmt-success: #21c45d;
  --fmt-warning: #f4a420;
  --fmt-danger:  #e3243a;
  --fmt-card:    rgba(255,255,255,0.04);
  --fmt-card-border: rgba(255,255,255,0.08);
  --fmt-muted:   rgba(255,255,255,0.55);
}

body { font-feature-settings: "ss01", "cv11"; }

header.hero {
  padding: 4rem 0 3rem;
  text-align: center;
  background: radial-gradient(circle at 50% 0%, rgba(227,25,55,0.18), transparent 60%);
}
header.hero .hero-svg {
  width: min(420px, 80%);
  height: auto;
  display: block;
  margin: 0 auto 1.5rem;
}
header.hero h1 {
  font-size: clamp(2.2rem, 5vw, 3.6rem);
  margin: 0 0 0.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}
header.hero p.tagline {
  font-size: 1.15rem;
  color: var(--fmt-muted);
  margin: 0 auto;
  max-width: 38rem;
}

/* Three-pillar cards */
.pillar-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
  gap: 1.25rem;
  margin: 2rem 0;
}
.pillar {
  background: var(--fmt-card);
  border: 1px solid var(--fmt-card-border);
  border-radius: 12px;
  padding: 1.4rem;
  text-decoration: none;
  color: inherit;
  display: block;
  transition: border-color 0.15s ease, transform 0.15s ease;
}
.pillar:hover {
  border-color: var(--fmt-accent);
  transform: translateY(-2px);
  text-decoration: none;
}
.pillar .icon {
  font-size: 2rem;
  margin-bottom: 0.5rem;
  display: block;
}
.pillar h3 { margin: 0 0 0.5rem; font-size: 1.2rem; }
.pillar p { margin: 0; color: var(--fmt-muted); font-size: 0.95rem; line-height: 1.45; }

/* Power tier table */
.power-tier {
  display: grid;
  grid-template-columns: minmax(8rem, 0.8fr) repeat(3, 1fr);
  gap: 0.75rem;
  margin: 1.5rem 0;
  font-size: 0.95rem;
}
.power-tier .row {
  display: contents;
}
.power-tier .row > * {
  padding: 0.7rem 0.85rem;
  background: var(--fmt-card);
  border: 1px solid var(--fmt-card-border);
  border-radius: 6px;
}
.power-tier .row.header > * {
  background: transparent;
  border: none;
  color: var(--fmt-muted);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.4rem 0.85rem;
}
.power-tier .row .tier-name {
  font-weight: 600;
}
.power-tier .row.t1 .tier-name { color: #f87171; }
.power-tier .row.t2 .tier-name { color: var(--fmt-warning); }
.power-tier .row.t3 .tier-name { color: var(--fmt-success); }
.power-tier .row.t4 .tier-name { color: #67e8f9; }

/* Search link buttons */
.search-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr));
  gap: 0.75rem;
  margin: 1.5rem 0;
}
.search-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 1.1rem;
  background: var(--fmt-card);
  border: 1px solid var(--fmt-card-border);
  border-radius: 8px;
  color: inherit;
  text-decoration: none;
  transition: border-color 0.15s, background 0.15s;
}
.search-link:hover {
  border-color: var(--fmt-accent);
  background: rgba(227,25,55,0.08);
  text-decoration: none;
}
.search-link .src {
  font-weight: 600;
  display: block;
}
.search-link .meta {
  display: block;
  font-size: 0.8rem;
  color: var(--fmt-muted);
  margin-top: 0.1rem;
}

/* Decision tree / callout boxes */
.callout {
  border-left: 3px solid var(--fmt-accent);
  background: var(--fmt-card);
  padding: 1rem 1.2rem;
  margin: 1.25rem 0;
  border-radius: 0 8px 8px 0;
}
.callout.warning { border-left-color: var(--fmt-warning); }
.callout.danger  { border-left-color: var(--fmt-danger); }
.callout.success { border-left-color: var(--fmt-success); }
.callout p:last-child { margin-bottom: 0; }
.callout .label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--fmt-muted);
  margin: 0 0 0.4rem;
  font-weight: 600;
}
.callout.warning .label { color: var(--fmt-warning); }
.callout.danger  .label { color: var(--fmt-danger); }
.callout.success .label { color: var(--fmt-success); }

/* Interactive calculator */
.calc {
  background: var(--fmt-card);
  border: 1px solid var(--fmt-card-border);
  border-radius: 10px;
  padding: 1.5rem;
  margin: 1.5rem 0;
}
.calc label { display: block; margin: 0.75rem 0 0.3rem; font-weight: 500; }
.calc output {
  display: block;
  margin-top: 1.5rem;
  padding: 1rem;
  background: rgba(227,25,55,0.08);
  border-left: 3px solid var(--fmt-accent);
  border-radius: 0 6px 6px 0;
  font-size: 1.05rem;
  line-height: 1.6;
}
.calc output strong { color: var(--fmt-accent); font-size: 1.25rem; }

/* Don't-do list */
.dont-list {
  list-style: none;
  padding: 0;
}
.dont-list li {
  padding: 0.7rem 0.9rem 0.7rem 2.4rem;
  margin: 0.5rem 0;
  background: rgba(227,36,58,0.07);
  border: 1px solid rgba(227,36,58,0.2);
  border-radius: 6px;
  position: relative;
}
.dont-list li:before {
  content: "⛔";
  position: absolute;
  left: 0.7rem;
  top: 0.65rem;
}

.do-list { list-style: none; padding: 0; }
.do-list li {
  padding: 0.7rem 0.9rem 0.7rem 2.4rem;
  margin: 0.5rem 0;
  background: rgba(33,196,93,0.06);
  border: 1px solid rgba(33,196,93,0.2);
  border-radius: 6px;
  position: relative;
}
.do-list li:before {
  content: "✓";
  position: absolute;
  left: 0.9rem;
  top: 0.7rem;
  color: var(--fmt-success);
  font-weight: bold;
}

/* CTA button */
.cta {
  display: inline-block;
  background: var(--fmt-accent);
  color: white !important;
  padding: 0.75rem 1.4rem;
  border-radius: 8px;
  font-weight: 600;
  text-decoration: none;
  margin: 0.5rem 0.25rem 0.5rem 0;
  transition: background 0.15s;
}
.cta:hover { background: var(--fmt-accent-dim); text-decoration: none; }
.cta.secondary {
  background: transparent;
  border: 1px solid var(--fmt-card-border);
  color: inherit !important;
}
.cta.secondary:hover { border-color: var(--fmt-accent); background: rgba(227,25,55,0.06); }

footer.container small a { color: var(--fmt-muted); }

/* SVG charts */
svg.chart {
  width: 100%;
  height: auto;
  max-width: 700px;
  margin: 1.5rem 0;
  display: block;
}

/* Search/filter input for state table */
.state-filter {
  width: 100%;
  padding: 0.7rem 1rem;
  background: var(--fmt-card);
  border: 1px solid var(--fmt-card-border);
  border-radius: 8px;
  color: inherit;
  font-size: 1rem;
  margin: 1rem 0;
}
.state-filter:focus {
  outline: none;
  border-color: var(--fmt-accent);
}

.state-list {
  list-style: none;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(20rem, 1fr));
  gap: 0.7rem;
}
.state-list li {
  background: var(--fmt-card);
  border: 1px solid var(--fmt-card-border);
  border-radius: 8px;
  padding: 0.9rem 1.1rem;
  transition: border-color 0.15s;
}
.state-list li:hover { border-color: var(--fmt-accent); }
.state-list li.hidden { display: none; }
.state-list .state-name {
  font-weight: 600;
  font-size: 1.05rem;
  margin: 0 0 0.3rem;
  display: block;
}
.state-list .state-tier {
  display: inline-block;
  font-size: 0.7rem;
  padding: 0.1rem 0.5rem;
  border-radius: 4px;
  margin-left: 0.4rem;
  vertical-align: middle;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.state-list .state-tier.high { background: rgba(33,196,93,0.15); color: #21c45d; }
.state-list .state-tier.mid  { background: rgba(244,164,32,0.15); color: var(--fmt-warning); }
.state-list .state-tier.low  { background: rgba(255,255,255,0.06); color: var(--fmt-muted); }
.state-list .state-utility { font-size: 0.85rem; color: var(--fmt-muted); margin: 0.3rem 0 0; }
.state-list .state-note    { font-size: 0.85rem; margin: 0.3rem 0 0.5rem; }
.state-list .state-links a {
  font-size: 0.8rem;
  margin-right: 0.5rem;
  white-space: nowrap;
}


/* Deep-link badge on state-list items (for states with /charging/states/* deep-dive pages) */
.state-list .deep-link {
  display: inline-block;
  margin-left: 0.5rem;
  padding: 0.15rem 0.55rem;
  background: rgba(227, 25, 55, 0.15);
  color: var(--fmt-accent);
  border: 1px solid rgba(227, 25, 55, 0.4);
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 600;
  text-decoration: none;
  vertical-align: middle;
  letter-spacing: 0.02em;
  transition: all 0.15s;
}
.state-list .deep-link:hover {
  background: var(--fmt-accent);
  color: white;
  text-decoration: none;
}
