/* Trevi design system, layer 3: editorial pages (author page, single article).
 * Only what those pages alone use. Loads after trevi-tokens.css and
 * trevi-components.css; page wrapper <div class="ts te te-author"> or
 * <div class="ts te te-article">. Design of record: design/author-article-2026-09/. */

/* Links that draw their own underline opt out of the tokens' gold border. */
.ts.ts .te-byline-who, .ts.ts .te-crumbs a, .ts.ts .te-toc a, .ts.ts .te-authorcard-name a, .ts.ts .te-prose a { border-bottom: 0; }

/* Profile circle, old-Facebook style: the avatar alone, no plate or box behind it.
 * The image carries its own gold ring and transparent corners, so no border is added. */
.ts.ts .te-portrait { position: relative; margin: 0; aspect-ratio: 1; width: 100%; }
.ts.ts .te-portrait img {
  display: block; width: 100%; height: 100%; border-radius: 50%;
  filter: drop-shadow(0 14px 28px rgba(14, 17, 48, .28));
}

/* ------------------------------------------------ author page */
.ts.ts .te-author-hero { min-height: clamp(540px, 74vh, 800px); }
.ts.ts .te-author-veil {
  background:
    linear-gradient(90deg, rgba(14,17,48,.90) 0%, rgba(14,17,48,.62) 46%, rgba(14,17,48,.22) 100%),
    linear-gradient(180deg, rgba(14,17,48,0) 50%, rgba(14,17,48,.85) 100%);
}
/* Bottom padding clears the profile circle, which rises 170px into the hero. */
.ts.ts .te-author-hero .ts-wrap { padding-bottom: 200px; }
.ts.ts .te-author-hero .ts-h1 { max-width: 12ch; }

.ts.ts .te-profile { position: relative; padding: 0 0 var(--space-9); background: var(--bg); }
.ts.ts .te-profile-grid {
  display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: var(--space-9); align-items: start;
}
/* The plate rises out of the hero: the page's one overlap. Text left, plate right. */
.ts.ts .te-profile .te-portrait { grid-column: 2; grid-row: 1; justify-self: center; width: 340px; margin-top: -170px; z-index: 1; }
.ts.ts .te-profile .te-profile-text { grid-column: 1; grid-row: 1; }
.ts.ts .te-profile-text { padding-top: var(--space-9); }
.ts.ts .te-bio {
  margin: var(--space-6) 0 var(--space-7);
  font-family: var(--font-serif); font-size: clamp(21px, 1.7vw, 27px); line-height: 1.55; color: var(--ink-2);
  text-align: justify; hyphens: manual; text-wrap: pretty;
}
.ts.ts .te-bio::first-letter {
  float: left; font-family: var(--font-display); font-weight: 400; font-size: 3.3em; line-height: .86;
  margin: .06em .12em 0 0; color: var(--gold-deep);
}
.ts.ts .te-facts {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-5);
  margin: 0 0 var(--space-7); padding: var(--space-6) 0 0; border-top: 1px solid var(--border-gold);
}
.ts.ts .te-facts div { margin: 0; }
.ts.ts .te-facts dt {
  font-family: var(--font-display); font-weight: 400; font-size: clamp(34px, 3vw, 46px); line-height: 1;
  color: var(--navy-800); letter-spacing: .02em;
}
.ts.ts .te-facts dd {
  margin: var(--space-3) 0 0; font-family: var(--font-sans); font-size: var(--fs-meta);
  line-height: 1.45; color: var(--fg-3); max-width: 22ch;
}

.ts.ts .te-articles { padding: var(--space-9) 0 var(--space-10); background: var(--paper); }
.ts.ts .te-section-head {
  display: flex; flex-wrap: wrap; gap: var(--space-5) var(--space-7); align-items: flex-end; justify-content: space-between;
  margin-bottom: var(--space-8); padding-bottom: var(--space-6); border-bottom: 1px solid var(--border);
}
.ts.ts .te-section-head .ts-h2 { margin-top: var(--space-4); color: var(--navy-800); }

.ts.ts .te-pager { display: flex; flex-wrap: wrap; gap: var(--space-2); justify-content: center; margin-top: var(--space-9); }
.ts.ts .te-pager a {
  min-width: 48px; height: 48px; padding: 0 14px; display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--border-strong); color: var(--navy-800); text-decoration: none;
  font-family: var(--font-sans); font-size: var(--fs-meta); letter-spacing: .08em;
  transition: background var(--dur-2) var(--ease-out), border-color var(--dur-2) var(--ease-out);
}
.ts.ts .te-pager a:hover { border-color: var(--gold); }
.ts.ts .te-pager a.is-current { background: var(--navy-800); border-color: var(--navy-800); color: var(--champagne-100); }
.ts.ts .te-pager .te-pager-next { text-transform: uppercase; font-size: var(--fs-eyebrow); letter-spacing: var(--tracking-eyebrow); padding: 0 22px; }

/* ------------------------------------------------ article page */
.ts.ts .te-article-hero { min-height: clamp(560px, 84vh, 920px); }
.ts.ts .te-article-hero picture { position: absolute; inset: 0; }
.ts.ts .te-article-hero .ts-wrap { padding-top: var(--space-9); }
.ts.ts .te-crumbs {
  display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: var(--space-7);
  font-family: var(--font-sans); font-size: var(--fs-eyebrow); letter-spacing: var(--tracking-eyebrow);
  text-transform: uppercase; color: var(--champagne-300);
}
.ts.ts .te-crumbs a { color: var(--champagne-200); text-decoration: none; }
.ts.ts .te-crumbs a:hover { color: var(--gold-light); }
.ts.ts .te-title {
  margin: var(--space-5) 0; max-width: 22ch;
  font-family: var(--font-serif); font-weight: 500; font-size: clamp(38px, 4.8vw, 76px); line-height: 1.06;
  letter-spacing: -.005em; text-transform: none; color: var(--champagne-100); text-wrap: balance;
  text-shadow: 0 4px 24px rgba(0,0,0,.35);
}
.ts.ts .te-article-hero .ts-hero-lede { max-width: 52ch; font-size: clamp(19px, 1.6vw, 24px); }

.ts.ts .te-byline { align-items: center; }
.ts.ts .te-byline-who { display: inline-flex; align-items: center; gap: 14px; color: var(--champagne-300); text-decoration: none; line-height: 1.6; }
.ts.ts .te-byline-who strong { color: var(--champagne-100); font-weight: 500; }
.ts.ts .te-byline-who:hover strong { color: var(--gold-light); }
/* .ts-hero img (the hero photograph rule) would otherwise stretch the byline photo over the hero. */
.ts.ts .ts-hero img.te-avatar { position: static; inset: auto; width: 48px; height: 48px; border: 0; background: none; object-fit: cover; animation: none; }
.ts.ts .te-avatar {
  width: 48px; height: 48px; flex: 0 0 48px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
  background: var(--navy-700); border: 1px solid var(--gold); color: var(--champagne-300);
  font-family: var(--font-display); font-size: 15px; letter-spacing: .06em;
}

.ts.ts .te-body { padding: var(--space-9) 0 var(--space-9); background: var(--bg); }
.ts.ts .te-body-grid { display: grid; grid-template-columns: 232px minmax(0, 1fr); gap: var(--space-8); align-items: start; }

.ts.ts .te-toc { position: sticky; top: 132px; }
.ts.ts .te-toc summary { list-style: none; cursor: default; padding-bottom: var(--space-4); border-bottom: 1px solid var(--border-gold); }
.ts.ts .te-toc summary::-webkit-details-marker { display: none; }
.ts.ts .te-toc ol { counter-reset: toc; margin-top: var(--space-4); }
.ts.ts .te-toc li { counter-increment: toc; }
.ts.ts .te-toc a {
  display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 6px; padding: 9px 0 9px 12px; margin-left: -12px;
  border-left: 2px solid transparent; text-decoration: none;
  font-family: var(--font-sans); font-size: var(--fs-meta); line-height: 1.45; color: var(--fg-3);
  transition: color var(--dur-2) var(--ease-out), border-color var(--dur-2) var(--ease-out);
}
.ts.ts .te-toc a::before { content: counter(toc, decimal-leading-zero); font-family: var(--font-display); font-size: 12px; color: var(--gold-deep); padding-top: 2px; }
.ts.ts .te-toc a:hover { color: var(--navy-800); }
.ts.ts .te-toc a.is-active { color: var(--navy-800); border-left-color: var(--gold); font-weight: 500; }

/* Reading column at about 68 characters; figures and tables run wider. */
.ts.ts .te-prose {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 720px) minmax(0, 1fr);
  font-family: var(--font-serif); font-size: clamp(19px, 1.28vw, 22px); line-height: 1.72; color: var(--ink-2);
}
.ts.ts .te-prose > * { grid-column: 2; }
.ts.ts .te-prose > p { margin: 0 0 1.05em; text-align: justify; hyphens: manual; text-wrap: pretty; }
.ts.ts .te-prose a { color: var(--gold-ink); text-decoration: underline; text-decoration-color: var(--gold); text-underline-offset: 3px; text-decoration-thickness: 1px; }
.ts.ts .te-prose a:hover { color: var(--navy-800); }
.ts.ts .te-prose .te-dateline {
  margin-bottom: var(--space-5); font-family: var(--font-sans); font-weight: 500; font-size: var(--fs-eyebrow);
  letter-spacing: var(--tracking-eyebrow); text-transform: uppercase; color: var(--accent-deep); text-align: left;
}
.ts.ts .te-prose .te-first { font-size: 1.14em; line-height: 1.62; color: var(--ink); }
.ts.ts .te-prose .te-first::first-letter {
  float: left; font-family: var(--font-display); font-weight: 400; font-size: 3.6em; line-height: .84;
  margin: .07em .1em 0 0; color: var(--gold-deep);
}
.ts.ts .te-prose h2 {
  margin: 1.9em 0 .7em; scroll-margin-top: 120px;
  font-family: var(--font-serif); font-weight: 400; font-style: italic; text-transform: none; letter-spacing: 0;
  font-size: clamp(30px, 2.5vw, 42px); line-height: 1.15; color: var(--navy-800); text-wrap: balance;
}
.ts.ts .te-prose h2::before { content: ""; display: block; width: 44px; height: 1px; margin-bottom: 22px; background: var(--gold); }
.ts.ts .te-prose h3 { margin: 1.6em 0 .5em; font-family: var(--font-serif); font-weight: 600; font-size: 1.2em; line-height: 1.3; color: var(--navy-800); text-transform: none; letter-spacing: 0; }
.ts.ts .te-prose ul, .ts.ts .te-prose ol { margin: 0 0 1.2em; padding: 0; }
.ts.ts .te-prose ul li { position: relative; padding-left: 26px; margin-bottom: .35em; }
.ts.ts .te-prose ul li::before { content: ""; position: absolute; left: 4px; top: .68em; width: 6px; height: 6px; background: var(--gold); transform: rotate(45deg); }
.ts.ts .te-prose ol { list-style: decimal; padding-left: 1.4em; }
.ts.ts .te-prose ol li::marker { color: var(--gold-deep); font-family: var(--font-display); }
.ts.ts .te-prose blockquote {
  margin: 1.4em 0; padding: 0 0 0 var(--space-5); border-left: 2px solid var(--gold);
  font-style: italic; font-size: 1.2em; line-height: 1.5; color: var(--navy-800);
}

.ts.ts .te-prose > figure { grid-column: 1 / -1; margin: var(--space-7) 0 var(--space-7); }
/* The frame clips the drift below. overflow: clip, never hidden: hidden would make the
 * frame a scroll container and freeze the view() timeline (see the Home Care README). */
.ts.ts .te-prose > figure .te-frame { display: block; overflow: clip; box-shadow: var(--shadow-3); }
.ts.ts .te-prose > figure img { display: block; width: 100%; height: auto; }
.ts.ts .te-prose > figure figcaption {
  max-width: 720px; margin: var(--space-4) auto 0; padding-left: var(--space-4); border-left: 1px solid var(--gold);
  font-family: var(--font-sans); font-size: var(--fs-meta); line-height: 1.6; color: var(--fg-3);
}

.ts.ts .te-table { grid-column: 1 / -1; margin: var(--space-6) 0 var(--space-7); overflow-x: auto; -webkit-overflow-scrolling: touch; }
.ts.ts .te-table table { width: 100%; min-width: 560px; border-collapse: collapse; font-family: var(--font-sans); font-size: var(--fs-body-sm); line-height: 1.45; }
.ts.ts .te-table th {
  padding: 16px 18px; text-align: left; background: var(--navy-800); color: var(--champagne-100);
  font-weight: 500; font-size: var(--fs-eyebrow); letter-spacing: var(--tracking-eyebrow); text-transform: uppercase;
}
.ts.ts .te-table td { padding: 16px 18px; border-bottom: 1px solid var(--border); color: var(--ink-2); vertical-align: top; }
.ts.ts .te-table tr:nth-child(odd) td { background: var(--paper); }
.ts.ts .te-table td:first-child { font-family: var(--font-serif); font-size: 1.12em; font-weight: 500; color: var(--navy-800); }

.ts.ts .te-notes {
  margin-top: var(--space-7); padding-top: var(--space-5); border-top: 1px solid var(--border-strong);
  font-family: var(--font-sans); font-size: var(--fs-meta); line-height: 1.7; color: var(--fg-3);
}
.ts.ts .te-notes .ts-eyebrow { margin-bottom: var(--space-3); }
.ts.ts .te-notes p { margin: 0 0 var(--space-3); }
.ts.ts .te-notes a { color: var(--fg-2); }

.ts.ts .te-authorcard {
  display: grid; grid-template-columns: 148px minmax(0, 1fr); gap: var(--space-6); align-items: start;
  margin-top: var(--space-8); padding: var(--space-7) var(--space-6); background: var(--paper);
  border-top: 1px solid var(--gold);
}
.ts.ts .te-portrait--small img { filter: drop-shadow(0 6px 14px rgba(14, 17, 48, .2)); }
.ts.ts .te-authorcard-name { margin: var(--space-3) 0 2px; }
.ts.ts .te-authorcard-name a {
  font-family: var(--font-display); font-weight: 500; font-size: 26px; letter-spacing: .04em; text-transform: uppercase;
  color: var(--navy-800); text-decoration: none;
}
.ts.ts .te-authorcard-role { font-style: italic; color: var(--fg-3); margin-bottom: var(--space-3); }
.ts.ts .te-authorcard-bio { font-size: var(--fs-body); line-height: 1.6; margin-bottom: var(--space-5); text-align: justify; hyphens: manual; }

.ts.ts .te-related { padding: var(--space-9) 0 var(--space-10); background: var(--navy-800); }
.ts.ts .te-related .ts-eyebrow { color: var(--gold-light); }
.ts.ts .te-related .ts-h2 { color: var(--champagne-100); margin: var(--space-4) 0 var(--space-8); }
.ts.ts .te-related .te-card-title { color: var(--champagne-100); }
.ts.ts .te-related .te-card-link:hover .te-card-title { color: var(--gold-light); }
.ts.ts .te-related .te-card-meta { color: var(--gold-light); }
.ts.ts .te-related .te-card-meta time { color: var(--champagne-300); }
.ts.ts .te-related .te-card-excerpt { color: var(--champagne-300); }
.ts.ts .te-related .te-card-photo { box-shadow: none; }

.ts.ts .te-related .te-h2link { color: var(--champagne-100); border-bottom: 0; text-decoration: none; transition: color var(--dur-2) var(--ease-out); }
.ts.ts .te-related .te-h2link::after { content: " \2192"; font-style: normal; font-size: .7em; color: var(--gold-light); }
.ts.ts .te-related .te-h2link:hover { color: var(--gold-light); }
.ts.ts .te-related-sub {
  display: flex; flex-wrap: wrap; gap: var(--space-5) var(--space-6); align-items: center; justify-content: space-between;
  margin: var(--space-9) 0 var(--space-7); padding-top: var(--space-7); border-top: 1px solid var(--border-on-dark);
}
.ts.ts .te-chips { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.ts.ts .te-chips a {
  padding: 10px 16px; border: 1px solid var(--border-on-dark); color: var(--champagne-200); text-decoration: none;
  font-family: var(--font-sans); font-weight: 500; font-size: var(--fs-eyebrow); letter-spacing: var(--tracking-eyebrow); text-transform: uppercase;
  transition: border-color var(--dur-2) var(--ease-out), color var(--dur-2) var(--ease-out);
}
.ts.ts .te-chips a:hover, .ts.ts .te-chips a:focus-visible { border-color: var(--gold); color: var(--gold-light); }

/* ------------------------------------------------ motion (same timelines as the service template) */
@supports (animation-timeline: view()) {
  .ts.ts .te-profile-text > *, .ts.ts .te-section-head, .ts.ts .te-card, .ts.ts .te-prose > h2, .ts.ts .te-prose > figure, .ts.ts .te-table, .ts.ts .te-authorcard {
    animation-name: var(--ts-in); animation-timing-function: linear; animation-fill-mode: both;
    animation-timeline: view(); animation-range: cover 0% cover 30%;
  }
  .ts.ts .te-grid > :nth-child(3n+2) { animation-range: cover 6% cover 38%; }
  .ts.ts .te-grid > :nth-child(3n) { animation-range: cover 12% cover 46%; }
  .ts.ts .te-profile .te-portrait { animation: var(--ts-in) 1400ms var(--ease-out) 500ms both; }
}
.ts.ts .te-article-hero .te-crumbs, .ts.ts .te-article-hero .te-title {
  animation-name: var(--ts-in); animation-duration: 1400ms; animation-timing-function: var(--ease-out);
  animation-fill-mode: both; animation-timeline: auto;
}
.ts.ts .te-article-hero .te-title { animation-delay: 200ms; }

/* Article photos move like the heroes (ts-float, trevi-components.css). The hero
 * photos already get it from the shared .ts-hero img rule. */
.ts.ts .te-article-hero img { animation-duration: 30s; }
.ts.ts .te-prose > figure .te-frame img {
  animation-name: var(--ts-hero-photo); animation-duration: 22s;
  animation-timing-function: ease-in-out; animation-iteration-count: infinite;
  animation-direction: alternate; animation-fill-mode: both;
  animation-timeline: auto; will-change: transform;
}
/* Photos further down start mid-movement so they never move in step. */
.ts.ts .te-prose > figure:nth-of-type(2n) .te-frame img { animation-delay: -9s; animation-direction: alternate-reverse; }
.ts.ts .te-prose > figure:nth-of-type(3n) .te-frame img { animation-delay: -15s; }
@media (prefers-reduced-motion: reduce) {
  .ts.ts .te-prose > figure .te-frame img { animation-duration: 30s; }
}

/* ------------------------------------------------ large screens */
@media (min-width: 1600px) {
  .ts.ts .te-body-grid { grid-template-columns: 260px minmax(0, 1fr); }
  .ts.ts .te-prose { grid-template-columns: minmax(0, 1fr) minmax(0, 760px) minmax(0, 1fr); }
}

/* ------------------------------------------------ tablet */
@media (max-width: 1100px) {
  .ts.ts .te-body-grid { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .ts.ts .te-toc { position: static; max-width: 720px; width: 100%; margin: 0 auto var(--space-7); }
  .ts.ts .te-toc details { border: 1px solid var(--border-gold); padding: var(--space-4) var(--space-5); background: var(--paper); }
  .ts.ts .te-toc summary { cursor: pointer; border: 0; padding: 0; display: flex; justify-content: space-between; }
  .ts.ts .te-toc summary::after { content: "+"; font-size: 18px; line-height: 1; color: var(--gold-deep); }
  .ts.ts .te-toc details[open] summary::after { content: "\2212"; }
  .ts.ts .te-prose { grid-template-columns: minmax(0, 1fr) minmax(0, 720px) minmax(0, 1fr); }
}

/* ------------------------------------------------ phone */
@media (max-width: 900px) {
  .ts.ts .te-profile-grid { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .ts.ts .te-profile .te-portrait { grid-column: 1; grid-row: 1; justify-self: start; width: 180px; margin-top: -90px; }
  .ts.ts .te-profile .te-profile-text { grid-column: 1; grid-row: 2; padding-top: var(--space-7); }
  .ts.ts .te-author-hero .ts-wrap { padding-bottom: calc(var(--space-9) + var(--space-6)); }
  .ts.ts .te-byline { flex-direction: column; align-items: flex-start; }
}
@media (max-width: 700px) {
  .ts.ts .te-facts { grid-template-columns: minmax(0, 1fr); gap: var(--space-5); }
  .ts.ts .te-facts div { display: grid; grid-template-columns: 96px minmax(0, 1fr); align-items: center; gap: var(--space-4); }
  .ts.ts .te-facts dd { margin: 0; }
  .ts.ts .te-prose { display: block; font-size: 19px; }
  .ts.ts .te-prose > figure, .ts.ts .te-table { margin-left: calc(var(--space-5) * -1); margin-right: calc(var(--space-5) * -1); }
  .ts.ts .te-prose > figure .te-frame { box-shadow: none; }
  .ts.ts .te-prose > figure figcaption { margin-left: var(--space-5); margin-right: var(--space-5); }
  .ts.ts .te-table { padding: 0 var(--space-5); }
  .ts.ts .te-authorcard { grid-template-columns: minmax(0, 1fr); gap: var(--space-5); padding: var(--space-6) var(--space-5); }
  .ts.ts .te-authorcard .te-portrait--small { width: 96px; }
  .ts.ts .te-authorcard-bio { text-align: left; }
  .ts.ts .te-title { font-size: clamp(34px, 9vw, 44px); }
}