/* Garaje — Feed editorial (light), Bootstrap 5.3 overlay */
:root,
[data-bs-theme="light"] {
  --bg: #f7f7f5;
  --surface: #ffffff;
  --text: #121212;
  --muted: #5c5c5c;
  --accent: #e8a838;
  --rule: #e4e4e0;
  --thumb-a: #1a1d24;
  --thumb-b: #2c1810;
  --thumb-c: #1e2a1a;
  --thumb-d: #1a2430;
  --bs-primary: #e8a838;
  --bs-primary-rgb: 232, 168, 56;
  --bs-link-color: #e8a838;
  --bs-link-hover-color: #c48a24;
  --bs-body-bg: #f7f7f5;
  --bs-body-color: #121212;
  --bs-border-color: #e4e4e0;
  --bs-secondary-color: #5c5c5c;
  --bs-tertiary-bg: #ffffff;
  --garaje-font-display: "Outfit", system-ui, sans-serif;
  --garaje-tap: 44px;
  --garaje-feed-max: 740px;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background-color: var(--bg);
  color: var(--text);
}

main {
  flex: 1 0 auto;
}

/* Narrow reading column (~720–760px) */
.container-feed {
  width: 100%;
  max-width: var(--garaje-feed-max);
  margin-left: auto;
  margin-right: auto;
  padding-left: 1rem;
  padding-right: 1rem;
}

.display-home,
.navbar-brand,
.section-label,
.featured-story .featured-title,
.feed-item .feed-title,
.article-title {
  font-family: var(--garaje-font-display);
  letter-spacing: -0.02em;
}

.display-home {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 700;
  line-height: 1.15;
  color: var(--text);
}

.section-label {
  font-weight: 700;
  font-size: 0.8125rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.lead {
  color: var(--muted) !important;
  font-size: 1.05rem;
}

/* Sticky light header */
.garaje-nav {
  background-color: var(--surface) !important;
  border-bottom: 1px solid var(--rule) !important;
}

/* Match Bootstrap .navbar > .container* — custom .container-feed was never flexed */
.garaje-nav > .container-feed {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-start;
}

@media (min-width: 992px) {
  .garaje-nav > .container-feed {
    flex-wrap: nowrap;
  }
}

.garaje-nav .navbar-brand {
  font-weight: 700;
  letter-spacing: 0.01em;
  color: var(--text);
  display: inline-flex;
  align-items: center;
  padding-top: 0.35rem;
  padding-bottom: 0.35rem;
}

.garaje-nav .navbar-brand img {
  height: 36px;
  width: auto;
  display: block;
}

@media (max-width: 575.98px) {
  .garaje-nav .navbar-brand img {
    height: 30px;
  }
}

.garaje-nav .navbar-brand .text-primary,
.garaje-nav .navbar-brand .brand-accent {
  color: var(--accent) !important;
}

.garaje-nav .nav-link {
  color: var(--muted);
  font-weight: 500;
}

.garaje-nav .nav-link:hover,
.garaje-nav .nav-link.active {
  color: var(--text);
}

.garaje-nav .nav-link.active {
  position: relative;
}

.garaje-nav .nav-link.active::after {
  content: "";
  position: absolute;
  left: 0.75rem;
  right: 0.75rem;
  bottom: 0.25rem;
  height: 2px;
  background: var(--accent);
}

.garaje-nav .navbar-toggler {
  min-width: var(--garaje-tap);
  min-height: var(--garaje-tap);
  padding: 0.35rem 0.55rem;
  border-color: var(--rule);
  margin-left: auto;
}

@media (min-width: 992px) {
  .garaje-nav .navbar-toggler {
    margin-left: 0;
  }
}

.garaje-nav .nav-search-compact {
  width: 100%;
  min-width: 0;
  margin-top: 0.75rem;
  margin-bottom: 0.25rem;
}

.garaje-nav .nav-search-compact .input-group,
.garaje-nav .nav-search-compact .form-control {
  min-width: 0;
}

@media (min-width: 992px) {
  .garaje-nav .nav-search-compact {
    width: auto;
    max-width: 14rem;
    flex: 0 0 auto;
    margin-top: 0;
    margin-bottom: 0;
  }
}

.garaje-nav .input-group-text,
.garaje-nav .form-control {
  background-color: var(--bg);
  border-color: var(--rule);
  color: var(--text);
}

.garaje-nav .form-control::placeholder {
  color: var(--muted);
}

/* Topic strip */
.topic-bar {
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.topic-bar::-webkit-scrollbar {
  display: none;
}

.topic-bar .btn {
  min-height: var(--garaje-tap);
  white-space: nowrap;
  flex: 0 0 auto;
  border-radius: 999px;
  font-weight: 500;
  text-transform: capitalize;
}

.topic-bar .btn-outline-secondary {
  border-color: var(--rule);
  color: var(--text);
  background: var(--surface);
}

.topic-bar .btn-outline-secondary:hover {
  background: var(--bg);
  border-color: var(--muted);
  color: var(--text);
}

.topic-bar .btn.active,
.topic-bar .btn[aria-pressed="true"],
.topic-bar .btn-primary {
  background-color: var(--accent) !important;
  border-color: var(--accent) !important;
  color: #121212 !important;
}

/* Featured story — whole card is the link */
.featured-story {
  display: block;
  text-decoration: none;
  color: inherit;
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: 0.35rem;
  overflow: hidden;
  transition: border-color 0.15s ease;
}

.featured-story:hover {
  border-color: #ccc;
  color: inherit;
}

.featured-story:hover .featured-title {
  color: #121212 !important;
}

.featured-story .featured-cover {
  display: block;
  width: 100%;
}

.featured-story .featured-body {
  padding: 1.15rem 1.25rem 1.35rem;
}

.featured-story .featured-title {
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 0.5rem;
  color: #121212 !important;
}

.featured-story .featured-excerpt {
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.5;
  margin-bottom: 0;
}

.featured-story .meta {
  font-size: 0.8125rem;
  color: var(--muted);
  margin-bottom: 0.5rem;
}

.featured-kicker {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.35rem;
}

/* Feed list */
.feed {
  /* stack of .feed-item rows */
}

.feed-item {
  margin-left: 0;
  margin-right: 0;
  border-bottom: 1px solid var(--rule) !important;
}

.feed-item:last-child {
  border-bottom: none !important;
}

.feed-item .meta {
  font-size: 0.8125rem;
  color: var(--muted);
}

.feed-item .feed-title {
  font-size: 1.1rem;
  font-weight: 600;
  line-height: 1.3;
}

.feed-item .feed-title a {
  color: #121212 !important;
}

.feed-item .feed-title a:hover {
  color: #121212 !important;
}

.feed-item .excerpt {
  color: var(--muted);
  line-height: 1.45;
}

/* Brand placeholder thumbs */
.thumb-ph {
  background-color: var(--thumb-a);
  color: rgba(255, 255, 255, 0.88);
  font-family: var(--garaje-font-display);
  font-weight: 700;
  font-size: clamp(0.7rem, 2.2vw, 0.95rem);
  letter-spacing: 0.08em;
  display: flex !important;
  align-items: center;
  justify-content: center;
  text-align: center;
  border-radius: 0.2rem;
  overflow: hidden;
}

.thumb-ph img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.thumb-ph[data-brand="tesla"] {
  background-color: var(--thumb-a);
}

.thumb-ph[data-brand="rivian"],
.thumb-ph[data-brand="dodge"] {
  background-color: var(--thumb-b);
}

.thumb-ph[data-brand="ford"] {
  background-color: var(--thumb-d);
}

.thumb-ph[data-brand="ev"],
.thumb-ph[data-brand="bmw"] {
  background-color: var(--thumb-c);
}

.thumb-ph[data-brand="stellantis"],
.thumb-ph[data-brand="garaje"] {
  background-color: #2a2418;
}

.featured-cover.thumb-ph {
  font-size: clamp(1.25rem, 4vw, 2rem);
  letter-spacing: 0.12em;
  border-radius: 0;
}

/* Priority: accent badge only for P0; others are meta text */
.badge-priority {
  background-color: var(--accent) !important;
  color: #121212 !important;
  font-weight: 600;
  font-size: 0.7rem;
  letter-spacing: 0.02em;
  vertical-align: middle;
}

.meta-priority {
  color: var(--muted);
}

/* Article */
.article-kicker {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
}

.article-title {
  font-weight: 700;
  letter-spacing: -0.02em;
  font-size: clamp(1.65rem, 3.5vw, 2.25rem);
  line-height: 1.2;
  color: var(--text);
}

.article-meta {
  color: var(--muted);
}

.article-cover {
  margin-bottom: 1.25rem;
}

.article-cover .thumb-ph,
.article-cover .article-cover-media {
  width: 100%;
  border-radius: 0.25rem;
  overflow: hidden;
}

.article-cover img.article-cover-media {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.article-body {
  font-size: 1.125rem;
  line-height: 1.65;
  color: var(--text);
}

.article-body p {
  margin-bottom: 1rem;
}

.article-tags .tag-chip {
  border-radius: 999px;
  border-color: var(--rule);
  color: var(--muted);
  font-size: 0.75rem;
}

.article-tags .tag-chip:hover {
  border-color: var(--accent);
  color: var(--text);
  background: transparent;
}

.source-block {
  border-top: 1px solid var(--rule);
  padding-top: 1rem;
  margin-top: 2rem;
  font-size: 0.9rem;
  color: var(--muted);
}

.source-block a,
.source-block .link-primary,
a.link-primary,
.article-body a,
.article .article-body a {
  color: var(--accent) !important;
  text-decoration-color: rgba(232, 168, 56, 0.45);
}

/* Related feed titles stay editorial black (not amber) */
.related .feed-item .feed-title a,
.related .feed-item .feed-title a.link-dark,
.article .related .feed-item .feed-title a {
  color: #121212 !important;
  text-decoration: none;
}
.related .feed-item .feed-title a:hover,
.article .related .feed-item .feed-title a:hover {
  color: #121212 !important;
  text-decoration: underline;
}

.source-block a:hover,
a.link-primary:hover {
  color: #c48a24 !important;
}

/* Related as short feed */
.related .section-label {
  margin-bottom: 0.75rem;
}

.related .feed-item .feed-title {
  font-size: 1.05rem;
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--rule);
  color: var(--muted);
  font-size: 0.85rem;
  margin-top: auto;
  background: var(--surface);
}

/* Empty / skeleton */
.feed-empty {
  padding: 1.25rem 0;
  color: var(--muted);
}

.feed-skel .placeholder {
  background-color: #e8e8e4;
}

/* A11y */
:focus-visible {
  outline: 2px solid #7aa2ff;
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Amber primary buttons */
.btn-primary {
  --bs-btn-color: #121212;
  --bs-btn-bg: #e8a838;
  --bs-btn-border-color: #e8a838;
  --bs-btn-hover-color: #121212;
  --bs-btn-hover-bg: #f0c06a;
  --bs-btn-hover-border-color: #f0c06a;
  --bs-btn-focus-shadow-rgb: 232, 168, 56;
  --bs-btn-active-color: #121212;
  --bs-btn-active-bg: #d49a2e;
  --bs-btn-active-border-color: #d49a2e;
  --bs-btn-disabled-color: #121212;
  --bs-btn-disabled-bg: #e8a838;
  --bs-btn-disabled-border-color: #e8a838;
}


.thumb-ph.has-photo {
  background: #ddd;
  padding: 0;
}
.thumb-ph.has-photo img,
.featured-cover img,
.article-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.image-credit {
  font-size: 0.75rem;
  color: var(--muted);
}


/* Archive: day headers + pagination */
.day-header {
  font-family: var(--garaje-font-display, "Outfit", system-ui, sans-serif);
  font-weight: 700;
  font-size: 0.8125rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  border-bottom: 1px solid var(--rule);
  padding-bottom: 0.35rem;
  margin-top: 1.25rem;
}

.day-header:first-child {
  margin-top: 0;
}

.archive-pagination .btn {
  min-height: var(--garaje-tap, 44px);
}

.archive-link {
  font-weight: 600;
}
