/* ============================================================
   Author pages (/authors/ and /authors/<slug>/)
   Matches the card + orange-accent language used by
   industries.css and the editor list in content.css.
   ============================================================ */

/* Visually hidden but still read aloud. content.css may already define
   .sr-only; repeated here so an author page is styled correctly even if
   that file is ever unlinked. */
.author-page .sr-only,
.authors-hub .sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* ---------- Author hero ---------- */
.author-hero {
  display: flex;
  flex-wrap: wrap;
  gap: 26px;
  align-items: flex-start;
  margin: 0 0 1.8em;
  padding-bottom: 1.5em;
  border-bottom: 1px solid #ececec;
}
.author-hero-photo {
  flex: 0 0 auto;
  width: 150px;
  height: 150px;
  border-radius: 50%;
  overflow: hidden;
  background: #fff3e8;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 3px solid #ff6600;
}
.author-hero-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.author-initials {
  font-size: 2.4rem;
  font-weight: 700;
  color: #ff6600;
  letter-spacing: 1px;
}
.author-hero-text { flex: 1 1 300px; min-width: 0; }
.author-hero-text h1 { margin: 0 0 .15em; line-height: 1.15; }
.author-headline {
  margin: 0 0 .8em;
  font-size: 1.1rem;
  color: #ff6600;
  font-weight: 600;
}

.author-meta,
.author-social {
  list-style: none;
  margin: 0 0 .6em;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  font-size: .93rem;
  color: #555;
}
.author-meta i { color: #ff6600; margin-right: 5px; }
.author-meta a,
.author-social a { color: #ff6600; text-decoration: none; }
.author-meta a:hover,
.author-social a:hover { text-decoration: underline; }
.author-social li:not(:last-child)::after {
  content: "\00b7";
  margin-left: 20px;
  color: #ccc;
}

/* ---------- Bio + testimonial ---------- */
.author-bio p {
  margin: 0 0 1em;
  line-height: 1.65;
  max-width: 760px;
}
.author-testimonial {
  margin: 1.6em 0;
  padding: 16px 20px;
  background: #fff7f0;
  border-left: 4px solid #ff6600;
  border-radius: 0 6px 6px 0;
  max-width: 760px;
}
.author-testimonial p { margin: 0 0 .5em; font-style: italic; line-height: 1.6; }
.author-testimonial cite { font-style: normal; font-weight: 600; color: #555; font-size: .92rem; }

/* ---------- Affiliate disclosure ----------
   Small, but never hidden: Amazon's terms and the FTC both require it to be
   visible before the links it covers. */
.affiliate-disclosure {
  margin: 1.5em 0;
  padding: 10px 14px;
  background: #f7f7f7;
  border: 1px solid #e6e6e6;
  border-radius: 6px;
  font-size: .82rem;
  color: #666;
  line-height: 1.5;
  max-width: 760px;
}

/* ---------- Book block ---------- */
.book {
  margin: 2.2em 0;
  padding: 1.8em 0 0;
  border-top: 1px solid #ececec;
}
.book:first-of-type { border-top: 0; padding-top: 0; }

.book-main {
  display: flex;
  flex-wrap: wrap;
  gap: 30px;
  align-items: flex-start;
}
.book-cover {
  flex: 0 0 auto;
  width: 220px;
  max-width: 100%;
}
.book-cover img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 4px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, .18);
}
.book-cover-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 220px;
  height: 320px;
  background: #fff3e8;
  border: 1px dashed #ffb37a;
  border-radius: 4px;
  font-size: 3rem;
  color: #ffb37a;
}
.book-info { flex: 1 1 320px; min-width: 0; }
.book-title { margin: 0 0 .1em; line-height: 1.2; }
.book-subtitle {
  margin: 0 0 .8em;
  font-size: 1.05rem;
  color: #666;
  font-style: italic;
}

/* ---------- Editorial assessment ----------
   Measured bars, not stars. Amazon's rating is stars and it lives on the same
   page as our buy link; a different shape entirely is the only reliable way to
   stop a reader reading one as the other. Brand orange is kept, because the
   shape already does the distinguishing. */
.book-assessment {
  margin: 2em 0 0;
  padding: 22px 24px;
  background: #fffaf6;
  border: 1px solid #ffd9bd;
  border-radius: 10px;
  max-width: 800px;
}
.book-assessment h3 { margin: 0 0 1em; font-size: 1.15rem; }

.assessment-top {
  display: flex;
  gap: 18px;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 1.4em;
  padding-bottom: 1.2em;
  border-bottom: 1px solid #ffe4ce;
}
.assessment-intro {
  flex: 1 1 260px;
  margin: 0;
  font-size: .9rem;
  line-height: 1.55;
  color: #555;
}

/* The overall number */
.score-badge {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: baseline;
  justify-content: center;
  gap: 2px;
  min-width: 92px;
  padding: 12px 16px;
  background: #ff6600;
  color: #fff;
  border-radius: 10px;
  line-height: 1;
}
.score-badge-num { font-size: 2rem; font-weight: 800; letter-spacing: -.02em; }
.score-badge-max { font-size: .85rem; font-weight: 600; opacity: .85; }

/* Per-parameter rows */
.assessment-list { margin: 0; padding: 0; list-style: none; }
.assessment-row { margin: 0 0 1.15em; }
.assessment-row:last-child { margin-bottom: 0; }

.assessment-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 5px;
}
.assessment-label { font-weight: 700; color: #333; font-size: .97rem; }
.assessment-score { font-weight: 800; color: #ff6600; font-size: 1.05rem; white-space: nowrap; }
.assessment-of { font-size: .72rem; font-weight: 600; color: #b0752f; margin-left: 1px; }

/* The track carries faint marks every 2 points, so a bar reads as a measured
   scale rather than a vague progress bar. */
.assessment-track {
  position: relative;
  height: 10px;
  border-radius: 5px;
  background: #f0e6dc;
  overflow: hidden;
  background-image: linear-gradient(90deg, rgba(0,0,0,.13) 1px, transparent 1px);
  background-size: 20% 100%;
}
.assessment-fill {
  height: 100%;
  border-radius: 5px 0 0 5px;
  background: linear-gradient(90deg, #ff8c33, #ff6600);
}
.assessment-what {
  margin: 6px 0 0;
  font-size: .85rem;
  line-height: 1.5;
  color: #6b6b6b;
  max-width: 640px;
}

/* The editor's prose, under the numbers */
.assessment-review {
  margin: 1.5em 0 0;
  padding-top: 1.2em;
  border-top: 1px solid #ffe4ce;
}
.assessment-review p {
  margin: 0 0 .5em;
  line-height: 1.65;
  color: #333;
  font-size: .97rem;
}
.assessment-review cite { font-style: normal; font-weight: 600; color: #777; font-size: .87rem; }

/* ---------- Genre chips ---------- */
.book-genres {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0 0 1em;
  padding: 0;
}
.book-genres li {
  background: #fff3e8;
  color: #b34700;
  border-radius: 999px;
  padding: 3px 11px;
  font-size: .78rem;
  font-weight: 600;
  white-space: nowrap;
}

/* ---------- Book facts ---------- */
.book-facts {
  margin: 0 0 1.2em;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 8px 20px;
  font-size: .9rem;
}
.book-facts > div {
  border-bottom: 1px solid #f0f0f0;
  padding-bottom: 5px;
}
.book-facts dt {
  color: #888;
  font-size: .78rem;
  text-transform: uppercase;
  letter-spacing: .04em;
  margin: 0;
}
.book-facts dd { margin: 2px 0 0; color: #333; font-weight: 600; }

/* ---------- Buy links ---------- */
.book-buy { margin: 1.2em 0 0; }
.book-buy-btn { background: #ff6600; }
.book-buy-alt {
  list-style: none;
  margin: .9em 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
  font-size: .9rem;
}
.book-buy-alt a { color: #ff6600; text-decoration: none; }
.book-buy-alt a:hover { text-decoration: underline; }

/* ---------- Description / editing story ---------- */
.book-description,
.book-editing-story { margin: 1.8em 0 0; max-width: 800px; }
.book-description h3,
.book-editing-story h3,
.book-similar h3 {
  margin: 0 0 .6em;
  font-size: 1.15rem;
  color: #333;
}
.book-description p { margin: 0 0 1em; line-height: 1.65; }

.book-editing-story {
  padding: 16px 20px;
  background: #fafafa;
  border-left: 4px solid #ffb37a;
  border-radius: 0 6px 6px 0;
}
.book-editing-story p { margin: 0; line-height: 1.65; }

/* ---------- Similar books ---------- */
.book-similar { margin: 2em 0 0; }
.similar-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 14px;
}
.similar-item {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 12px 14px;
  border: 1px solid #e6e6e6;
  border-radius: 6px;
  background: #fff;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.similar-item:hover {
  border-color: #ff6600;
  box-shadow: 0 3px 10px rgba(0, 0, 0, .07);
}
.similar-title {
  font-weight: 700;
  color: #ff6600;
  text-decoration: none;
  line-height: 1.3;
}
a.similar-title:hover { text-decoration: underline; }
.similar-author { font-size: .85rem; color: #666; }
.similar-note { font-size: .85rem; color: #555; line-height: 1.45; margin-top: 3px; }

/* ---------- Credit + CTA + back ---------- */
.author-credit {
  margin: 2.4em 0 0;
  padding-top: 1.5em;
  border-top: 1px solid #ececec;
}
.author-credit h2 { margin: 0 0 .5em; font-size: 1.25rem; }
.author-credit p { margin: 0 0 .6em; line-height: 1.6; max-width: 760px; }
.author-credit a,
.author-crosslink a { color: #ff6600; font-weight: 600; text-decoration: none; }
.author-credit a:hover,
.author-crosslink a:hover { text-decoration: underline; }

.author-cta {
  margin: 2.4em 0 1em;
  padding: 22px 24px;
  background: #fff7f0;
  border-radius: 8px;
  text-align: center;
}
.author-cta h2 { margin: 0 0 .4em; font-size: 1.3rem; }
.author-cta p { margin: 0 auto 1.1em; max-width: 620px; line-height: 1.6; }

.author-back { margin-top: 1.5em; }
.author-back a { color: #ff6600; text-decoration: none; }
.author-back a:hover { text-decoration: underline; }

.author-nobooks { color: #666; font-style: italic; }

/* ============================================================
   Hub (/authors/)
   ============================================================ */
.authors-lede {
  font-size: 1.05rem;
  color: #444;
  max-width: 760px;
  margin: 0 0 1.5em;
  line-height: 1.65;
}
.authors-empty {
  padding: 18px 20px;
  background: #fafafa;
  border: 1px solid #eee;
  border-radius: 6px;
  color: #555;
  max-width: 760px;
}
.authors-empty a,
.authors-noresults a,
.authors-crosslink a { color: #ff6600; font-weight: 600; text-decoration: none; }
.authors-empty a:hover,
.authors-noresults a:hover,
.authors-crosslink a:hover { text-decoration: underline; }

.authors-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 1.6em;
}
.authors-filter {
  padding: 6px 14px;
  border: 1px solid #ddd;
  border-radius: 999px;
  background: #fff;
  color: #555;
  font-size: .87rem;
  cursor: pointer;
  transition: all .15s ease;
}
.authors-filter:hover { border-color: #ff6600; color: #ff6600; }
.authors-filter.is-active { background: #ff6600; border-color: #ff6600; color: #fff; }

/* Cards are capped at 340px and centred, so a single author does not stretch
   into a full-width slab — same fix as the editor grid. */
.author-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(270px, 340px));
  justify-content: center;
  gap: 24px;
  margin: 1.5em 0 2em;
}
.author-card {
  display: flex;
  flex-direction: column;
  border: 1px solid #e2e2e2;
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
  transition: box-shadow .18s ease, transform .18s ease;
}
.author-card:hover {
  box-shadow: 0 8px 22px rgba(0, 0, 0, .1);
  transform: translateY(-2px);
}
.author-card-cover {
  background: #f3f3f3;
  padding: 18px 18px 0;
  display: flex;
  justify-content: center;
}
.author-card-cover img {
  width: auto;
  max-width: 60%;
  height: auto;
  max-height: 230px;
  border-radius: 3px 3px 0 0;
  box-shadow: 0 5px 14px rgba(0, 0, 0, .22);
  display: block;
}
.author-card-cover .book-cover-placeholder {
  width: 130px;
  height: 190px;
  font-size: 2.2rem;
}
.author-card-body {
  padding: 16px 18px 18px;
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
}
.author-card-photo {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #ff6600;
  margin: -44px 0 8px;      /* laps over the cover panel */
  background: #fff3e8;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
}
.author-card-name { margin: 0 0 .1em; font-size: 1.15rem; line-height: 1.25; }
.author-card-name a { color: #222; text-decoration: none; }
.author-card-name a:hover { color: #ff6600; }
.author-card-headline { margin: 0 0 .5em; font-size: .88rem; color: #ff6600; font-weight: 600; }
.author-card-book { margin: 0 0 .3em; font-size: .95rem; color: #333; }
.author-card-book cite { font-style: italic; }
.author-card-score {
  margin: 0 0 .7em;
  display: flex;
  align-items: center;
  gap: 9px;
}
.author-card-score .score-badge {
  min-width: 0;
  padding: 6px 10px;
  border-radius: 7px;
}
.author-card-score .score-badge-num { font-size: 1.15rem; }
.author-card-score .score-badge-max { font-size: .7rem; }
.author-card-score-label {
  font-size: .78rem;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: #888;
  font-weight: 600;
}
.author-card-blurb {
  margin: 0 0 .8em;
  font-size: .9rem;
  color: #555;
  line-height: 1.55;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.author-card-link {
  margin-top: auto;
  color: #ff6600;
  font-weight: 600;
  text-decoration: none;
  font-size: .92rem;
}
.author-card-link:hover { text-decoration: underline; }
.author-card-link i { margin-left: 5px; font-size: .8rem; }

/* ============================================================
   Overrides for the shared .service-content wrapper
   styles.css sets `.service-content ul {list-style:disc; margin-left:2.5em}`
   and centres `.service-content h1`. Both are more specific than a bare
   class selector, so every list here needs the wrapper in front of it or it
   renders with stray bullets and a 2.5em indent.
   ============================================================ */
.service-content .author-meta,
.service-content .author-social,
.service-content .book-genres,
.service-content .book-buy-alt,
.service-content .similar-grid,
.service-content .assessment-list,
.service-content .authors-filters {
  margin-left: 0;
  padding-left: 0;
  list-style: none;
}
.service-content .author-meta,
.service-content .author-social { margin: 0 0 .6em; }
.service-content .book-genres   { margin: 0 0 1em; }
.service-content .book-buy-alt  { margin: .9em 0 0; }
.service-content .similar-grid  { margin: 0; }
.service-content .assessment-list { margin: 0; }

/* The hero h1 sits beside the headshot, so centring it strands it. */
.service-content.author-page .author-hero-text h1 { text-align: left; }

/* styles.css gives every .service-content h2 a centred, inline-block, orange
   underline. That reads well on a section heading and badly on a card title,
   which needs to line up with the text under it. */
.service-content .author-card-name {
  display: block;
  text-align: left;
  border-bottom: 0;
  padding-bottom: 0;
  margin: 0 0 .15em;
  font-size: 1.15rem;
}

/* ---------- Mobile ---------- */
@media (max-width: 640px) {
  .author-hero { gap: 18px; }
  .author-hero-photo { width: 110px; height: 110px; }
  .book-cover { width: 160px; margin: 0 auto; }
  .book-cover-placeholder { width: 160px; height: 235px; }
  .book-main { gap: 20px; }
  .author-cta { padding: 18px 16px; }
}
