/* The Clairmont Automotive Report — site styles (mobile-first, also desktop) */
:root {
  --gold: #C9A047;
  --gold-dk: #8A6A1A;
  --ink: #222222;
  --muted: #555555;
  --bg: #F4F2EC;
  --paper: #ffffff;
  --rule: #E2D8C4;
  --link: #8A6A1A;
  --empty: #c8c2b6;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  -webkit-text-size-adjust: 100%;
  overflow-x: hidden;
}
img, video { max-width: 100%; height: auto; }
a { color: var(--link); }
a:hover { color: #6e5414; }

.wrap {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 12px 48px;
}
.masthead {
  background: #000;
  margin: 0 -12px 0;
}
.masthead img {
  display: block;
  width: 100%;
  height: auto;
  border: 0;
}
.masthead a { display: block; }

.site-tools {
  margin: 12px 0 8px;
}
.site-search {
  display: flex;
  gap: 8px;
  width: 100%;
}
.site-search input[type="search"] {
  flex: 1;
  min-width: 0;
  height: 44px;
  padding: 0 12px;
  border: 2px solid var(--gold);
  border-radius: 6px;
  font-size: 16px; /* iOS: avoid zoom */
  font-family: inherit;
  background: var(--paper);
  color: var(--ink);
}
.site-search input[type="search"]:focus {
  outline: 2px solid var(--gold-dk);
  outline-offset: 2px;
}
.site-search button {
  height: 44px;
  padding: 0 16px;
  border: 0;
  border-radius: 6px;
  background: var(--gold-dk);
  color: #fff;
  font-size: 16px;
  font-weight: bold;
  font-family: inherit;
  cursor: pointer;
  white-space: nowrap;
}
.site-search button:hover,
.site-search button:focus {
  background: #6e5414;
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

.search-panel {
  margin: 8px 0 0;
  background: var(--paper);
  border: 2px solid var(--gold);
  border-radius: 6px;
  padding: 12px;
  max-height: min(70vh, 520px);
  overflow: auto;
}
.search-panel[hidden] { display: none; }
.search-count, .search-empty {
  margin: 0 0 8px;
  font-size: 0.9rem;
  color: var(--muted);
}
.search-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.search-list li { margin: 0 0 10px; }
.search-list a {
  display: block;
  text-decoration: none;
  color: var(--ink);
  border: 1px solid var(--rule);
  border-radius: 6px;
  padding: 10px 12px;
  background: #fbf8f0;
}
.search-list a:hover,
.search-list a:focus {
  outline: 2px solid var(--gold-dk);
  outline-offset: 2px;
}
.search-title {
  display: block;
  font-weight: bold;
  color: var(--gold-dk);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.search-date {
  display: block;
  font-size: 0.82rem;
  color: var(--muted);
  margin: 3px 0 4px;
}
.search-teaser {
  display: block;
  font-size: 0.95rem;
  line-height: 1.4;
}

.cal-toggle {
  margin: 10px 0 0;
  border: 2px solid var(--gold);
  border-radius: 6px;
  background: var(--paper);
  padding: 0;
}
.cal-toggle > summary {
  list-style: none;
  cursor: pointer;
  padding: 12px 14px;
  font-weight: bold;
  color: var(--gold-dk);
  min-height: 44px;
}
.cal-toggle > summary::-webkit-details-marker { display: none; }
.cal-toggle > summary::after {
  content: " ▾";
  font-weight: normal;
}
.cal-toggle[open] > summary::after { content: " ▴"; }
.cal-toggle .calendar { padding: 0 10px 12px; }

.calendar { margin: 0; }
.cal-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin: 0 0 8px;
}
.cal-heading {
  margin: 0;
  font-size: 1rem;
  text-align: center;
  flex: 1;
  border: 0;
  padding: 0;
}
.cal-prev, .cal-next {
  width: 44px;
  height: 44px;
  border: 1px solid var(--rule);
  border-radius: 6px;
  background: var(--paper);
  color: var(--ink);
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
}
.cal-prev:hover, .cal-next:hover,
.cal-prev:focus, .cal-next:focus {
  outline: 2px solid var(--gold-dk);
  outline-offset: 2px;
}
.cal-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 4px;
}
.cal-dow {
  text-align: center;
  font-size: 0.7rem;
  font-weight: bold;
  color: var(--muted);
  letter-spacing: 0.02em;
  padding: 4px 0;
}
.cal-day {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  border-radius: 6px;
  text-decoration: none;
  font-size: 0.95rem;
  color: var(--ink);
}
.cal-day.is-pad { visibility: hidden; }
.cal-day.is-empty {
  color: var(--empty);
  background: transparent;
  cursor: default;
}
.cal-day.has-issue {
  background: var(--paper);
  border: 2px solid var(--gold);
  color: var(--gold-dk);
  font-weight: bold;
}
.cal-day.has-issue:hover,
.cal-day.has-issue:focus {
  background: #fbf8f0;
  outline: 2px solid var(--gold-dk);
  outline-offset: 1px;
}
.cal-day.is-current {
  background: var(--gold-dk);
  color: #fff;
  border-color: var(--gold-dk);
}

.cal-section {
  margin: 16px 0 8px;
  padding: 14px;
  background: var(--paper);
  border: 2px solid var(--gold);
  border-radius: 6px;
}
.cal-section > h2 {
  margin-top: 0;
}

.layout { display: block; }
.page-main { min-width: 0; }
.page-side { min-width: 0; }

.issue-title {
  text-align: center;
  padding: 18px 8px 8px;
}
.issue-title h1 {
  margin: 0;
  font-size: 1.4rem;
  line-height: 1.3;
  color: var(--ink);
}
.issue-title .date {
  margin: 6px 0 0;
  font-size: 0.95rem;
  color: var(--muted);
}
h2 {
  margin: 28px 0 12px;
  font-size: 1.2rem;
  line-height: 1.3;
  border-bottom: 2px solid var(--gold);
  padding-bottom: 6px;
}
h2.section {
  border-bottom: 1px solid var(--rule);
  margin-top: 22px;
}
.lede {
  color: var(--muted);
  font-size: 0.95rem;
  margin: 0 0 8px;
}
.story-card {
  display: block;
  border: 2px solid var(--gold);
  border-radius: 6px;
  padding: 16px 18px;
  margin: 0 0 16px;
  background: var(--paper);
  text-decoration: none;
  color: var(--ink);
  box-shadow: 0 1px 0 rgba(0,0,0,0.04);
}
a.story-card:hover,
a.story-card:focus {
  background: #fbf8f0;
  outline: 2px solid var(--gold-dk);
  outline-offset: 2px;
}
.story-card h3 {
  margin: 0 0 8px;
  font-size: 1.05rem;
  line-height: 1.35;
  color: var(--gold-dk);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.story-card p {
  margin: 0;
  font-size: 0.98rem;
  line-height: 1.45;
  color: var(--ink);
  text-decoration: none;
}
.story-card .cue {
  display: block;
  margin-top: 8px;
  font-size: 0.85rem;
  color: var(--gold-dk);
}
article.full {
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: 6px;
  padding: 20px 16px 16px;
  margin: 16px 0 28px;
}
article.full h1 {
  margin: 0 0 12px;
  font-size: 1.32rem;
  line-height: 1.3;
  overflow-wrap: anywhere;
}
article.full .kicker {
  margin: 0 0 8px;
  font-size: 0.8rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}
article.full p { margin: 0 0 12px; }
.chart { margin: 8px 0 16px; }
.chart img {
  width: 100%;
  height: auto;
  display: block;
  border: 1px solid var(--rule);
}
.back { margin: 12px 0 0; font-size: 0.95rem; }
.footnote {
  font-size: 0.8rem;
  color: #666;
  margin: 8px 0 0;
}
footer {
  margin-top: 28px;
  padding-top: 12px;
  border-top: 1px solid var(--rule);
  font-size: 0.8rem;
  color: var(--muted);
}
.site-nav {
  text-align: center;
  font-size: 0.9rem;
  margin: 4px 0 0;
}
.previous-issues, .archive-month { margin: 32px 0 8px; }
.previous-issues ul, .archive-month ul {
  list-style: none;
  margin: 0;
  padding: 0;
}
.previous-issues li, .archive-month li { margin: 0 0 12px; }
.previous-issues li a, .archive-month li a {
  display: block;
  border: 2px solid var(--gold);
  border-radius: 6px;
  padding: 12px 16px;
  text-decoration: none;
  color: var(--ink);
  background: var(--paper);
}
.previous-issues li a:hover,
.previous-issues li a:focus,
.archive-month li a:hover,
.archive-month li a:focus {
  background: #fbf8f0;
  outline: 2px solid var(--gold-dk);
  outline-offset: 2px;
}
.pi-date, .archive-month .pi-date {
  display: block;
  font-weight: bold;
  color: var(--gold-dk);
  margin: 0 0 4px;
}
.pi-title, .archive-month .pi-title {
  display: block;
  font-size: 0.95rem;
  line-height: 1.4;
  color: var(--ink);
}
.site-url {
  margin: 6px 0 0;
  font-size: 0.85rem;
  color: var(--muted);
}
.site-url a { color: var(--gold-dk); text-decoration: none; }
.site-url a:hover, .site-url a:focus { text-decoration: underline; }
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

/* Desktop / PC (~960px and up, including 1366px) */
@media (min-width: 960px) {
  .wrap { padding: 0 24px 56px; }
  .masthead { margin: 0 -24px 0; }
  .site-tools {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 16px 24px;
    align-items: start;
    margin: 16px 0 12px;
  }
  .cal-toggle { display: none; }
  .layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 300px;
    gap: 28px;
    align-items: start;
  }
  .page-side .cal-section { margin-top: 18px; position: sticky; top: 12px; }
  .issue-title h1 { font-size: 1.6rem; }
  article.full { padding: 24px 24px 18px; }
  article.full h1 { font-size: 1.5rem; overflow-wrap: break-word; }
  .cal-day { min-height: 42px; }
}

@media (max-width: 959px) {
  /* Full calendar stays in the main column on phones; hide the desktop sidebar copy if both exist */
  .page-side { display: none; }
}

@media (min-width: 960px) {
  .cal-inline { display: none; }
}

/* Shared source and interpretation treatment for daily and weekly story pages. */
.story-sources { font-size: .88rem; color: var(--muted); overflow-wrap: anywhere; }
.industry-effect { border-left: 3px solid var(--gold); padding-left: 12px; }
article.full img { height: auto; max-width: 100%; }
