/* Index surfaces are kept together: photographs never carry reading text.
   Scoped to index so runner tools and cad-ai keep their own layouts. */
body.index-paper .page {
  --glass-shadow: 0 4px 18px #253c2c0a;
  color: var(--paper-ink);
  font-size: 1rem;
}
body.index-paper .page :is(p,small,label,summary,li) {
  color: var(--paper-muted);
  opacity: 1;
  text-shadow: none;
}
body.index-paper .page :is(h1,h2,h3,strong,dt,dd) { color: var(--paper-ink); text-shadow: none; }
body.index-paper .page :is(a,button) { font-family: inherit; text-shadow: none; }
body.index-paper #heroSection.runner-home { background: transparent !important; }
/* Explicit foregrounds also cover the greeting and intermediate auth states. */
body.index-paper #heroSection.runner-home #runnerGreeting { color: var(--paper-ink) !important; }
body.index-paper #heroSection.runner-home :is(.runner-access-note,#runnerRaceSummary) { color: var(--paper-muted) !important; }
body.index-paper #heroSection.runner-home .runner-summary-status {
  border: 1px solid var(--paper-border) !important;
  border-left: 3px solid var(--gold) !important;
  padding: 22px 24px;
  background: var(--paper-surface) !important;
}
body.index-paper .runner-summary-status::before { content: none; }
body.index-paper #heroSection.runner-home .runner-summary-status h2 { margin: 0 0 10px; font-size: 1.25rem; }
body.index-paper #heroSection.runner-home .runner-summary-status p { margin: 0; color: var(--paper-muted); }
body.index-paper #heroSection.runner-home p { opacity: 1; }
body.index-paper #heroSection.runner-home :is(.tool-card__head,.tool-card__body) {
  background: transparent !important;
  padding-left: 0;
  padding-right: 0;
  text-align: left;
}
body.index-paper #heroSection.runner-home :is(.tool-card,.runner-summary-card) {
  background: var(--paper-surface) !important;
  color: var(--paper-ink);
  border-width: 1px;
  border-color: var(--paper-border);
  box-shadow: var(--glass-shadow);
}
body.index-paper #heroSection.runner-home .tool-card--sub { border-top: 3px solid var(--gold); }
body.index-paper #heroSection.runner-home .tool-card--free { border-top: 3px solid var(--paper-green); }
body.index-paper #heroSection.runner-home .tool-card:hover {
  background: var(--paper-surface) !important;
  border-color: var(--paper-green);
  box-shadow: 0 8px 24px #253c2c16;
  transform: none;
}
body.index-paper #heroSection.runner-home .runner-dashboard-card {
  padding: 20px;
  grid-template-rows: 76px minmax(58px,auto) 1fr auto auto;
}
body.index-paper #heroSection.runner-home .runner-dashboard-card .tool-card__head { background: transparent !important; }
body.index-paper .runner-dashboard-card > .runner-button { align-self: end; }
body.index-paper .runner-dashboard-card::before {
  top: 16px; right: 16px; width: 104px; height: 70px;
  border-radius: 12px; opacity: .7; mask-image: none;
}
body.index-paper .runner-dashboard-card > .runner-eyebrow {
  align-self: start; max-width: calc(100% - 112px); padding: 4px 0;
}
body.index-paper #heroSection.runner-home .runner-dashboard-card .tool-card__body { min-height: 0; }
body.index-paper #heroSection.runner-home .runner-tool-card { padding: 20px; gap: 12px; }
body.index-paper #heroSection.runner-home .tool-card__foot {
  background: var(--paper-soft); border-radius: 8px;
  padding: 10px 12px; font-size: .875rem; line-height: 1.45;
}
body.index-paper #heroSection.runner-home :is(.runner-text-link,.runner-eyebrow) { text-shadow: none; }
body.index-paper #heroSection.runner-home :is(.runner-button,.runner-help-button) {
  background: var(--paper-green) !important; color: #fffef9 !important;
  border: 1px solid var(--paper-green); box-shadow: none;
  font-size: .9375rem; line-height: 1.45; min-height: 46px;
}
body.index-paper #heroSection.runner-home :is(.runner-button-secondary,.runner-help-button) {
  background: var(--paper-soft) !important; color: var(--paper-green) !important;
  border-color: var(--paper-border);
}
body.index-paper #heroSection.runner-home :is(.runner-button,.runner-help-button):hover {
  background: #264b30 !important; color: #fffef9 !important; filter: none;
}
body.index-paper #heroSection.runner-home .runner-text-link { background: transparent; color: var(--paper-green) !important; }
body.index-paper .runner-summary-card { border-top: 3px solid var(--summary-accent) !important; }
body.index-paper .runner-summary-card::before {
  width: 96px; height: 64px; top: 14px; right: 14px;
  opacity: .65; border-radius: 10px; mask-image: none;
}
body.index-paper .runner-summary-card > h3 {
  background: transparent; padding: 0 110px 0 0; min-height: 68px;
}
body.index-paper .runner-summary-indicators::before { display: none; }
body.index-paper .runner-priority { border-width: 1px; border-left: 3px solid var(--gold); }
body.index-paper .runner-quick-access a {
  border-width: 1px; border-color: var(--paper-border);
  background: var(--paper-surface); color: var(--paper-green);
}
body.index-paper .runner-quick-access a:hover { background: var(--paper-result); }
body.index-paper .runner-view-heading { padding-right: clamp(140px,25%,300px); }
body.index-paper .runner-view-heading::before {
  width: 22%; inset: 16px 16px 16px auto; border-radius: 12px;
  opacity: .65; mask-image: none;
}
body.index-paper .runner-view-heading > * { max-width: 100%; }
body.index-paper .runner-search-label { color: var(--paper-ink); }
body.index-paper .runner-search {
  background: var(--paper-surface); color: var(--paper-ink);
  border-color: var(--paper-border);
}
body.index-paper :is(.runner-footer,.runner-catalog-group,.runner-recent-activities,.runner-extra-help) { border-color: var(--paper-border); }
body.index-paper .runner-footer a { font-size: .875rem; color: var(--paper-green); }
body.index-paper :is(.runner-indicator-details small,.runner-summary-card .runner-metric-explanation,.runner-quality-alternative summary) {
  color: var(--paper-muted); font-size: .875rem;
}

/* Editorial cards: separate, undimmed cover and opaque reading surface. */
body.index-paper #blogList {
  display: grid; grid-template-columns: repeat(auto-fit,minmax(min(100%,300px),1fr)); gap: 24px;
}
body.index-paper .articles .article {
  display: flex; flex-direction: column; gap: 0; min-height: 0;
  padding: 0; margin: 0; overflow: hidden; border-radius: 16px;
  background: var(--paper-surface); color: var(--paper-ink);
  border: 1px solid var(--paper-border); box-shadow: var(--glass-shadow);
}
body.index-paper .articles .article::before { content: none; }
body.index-paper .articles .article .thumb {
  position: relative; inset: auto; flex: none; width: 100%; max-width: none;
  aspect-ratio: 16 / 9; background: var(--paper-soft);
}
body.index-paper .articles .article .thumb img {
  position: absolute; inset: 0; width: 100% !important; height: 100% !important; object-fit: contain; object-position: center;
  border-radius: 0; transform: none; filter: none;
}
body.index-paper .articles .article > div:not(.thumb) {
  position: static; max-width: none; width: 100%; flex: 1;
  padding: 20px; border: 0; border-radius: 0; background: var(--paper-surface);
  box-shadow: none; backdrop-filter: none;
}
body.index-paper .articles .article h3 { font-size: 1.125rem; line-height: 1.4; text-shadow: none; margin: 0 0 10px; }
body.index-paper .articles .article p { display: block; font-size: .9375rem; line-height: 1.6; opacity: 1; }
body.index-paper :is(.articles .article,.events .article,.product):hover {
  transform: none; border-color: var(--paper-green); box-shadow: 0 8px 24px #253c2c16;
}
body.index-paper .events .article { background: var(--paper-surface); color: var(--paper-ink); box-shadow: var(--glass-shadow); }
body.index-paper .page .pill { background: var(--paper-result); color: var(--paper-green); }
body.index-paper :is(#blogSection,#eventsSection,.right,#detailView) { box-shadow: none; }
body.index-paper #blogSection {
  width: 100%; max-width: 1280px; margin: 0 auto; padding: clamp(20px,3vw,36px);
  border: 1px solid var(--paper-border); border-radius: 18px;
}
body.index-paper #blogSection > h2 {
  margin: 0 0 24px; padding: 0; border: 0; text-transform: none; font-size: 1.5rem;
}
body.index-paper #blogMore { margin-top: 24px !important; }
body.index-paper #detailView { background: var(--paper-surface) !important; }
body.index-paper .article-body { color: var(--paper-ink); }
body.index-paper .article-body :is(p,span,div,li,td,th,blockquote,h1,h2,h3,h4)[style] {
  color: var(--paper-ink) !important; background-color: transparent !important;
}
body.index-paper .article-body a { color: var(--paper-green); text-decoration: underline; }

/* Account and community: the same reading surfaces, with distinct groups. */
body.index-paper.mode-right .page { grid-template-columns: 1fr !important; max-width: 1200px; }
body.index-paper.mode-right .right {
  grid-area: auto; grid-column: 1 / -1; max-height: none; overflow: visible;
  display: grid !important; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 24px;
  padding: 0; border: 0; background: transparent; backdrop-filter: none;
}
body.index-paper .right > section {
  min-width: 0; padding: 24px; margin: 0 !important;
  background: var(--paper-surface); border: 1px solid var(--paper-border); border-radius: 16px;
}
body.index-paper.mode-right .right > .connect { grid-column: 1 / -1; }
body.index-paper .right h2 { text-transform: none; font-size: 1.25rem; border: 0; margin: 0 0 18px; padding: 0; }
body.index-paper .right :is(.tools-list,.cta) { display: flex; flex-direction: column; align-items: stretch; gap: 12px; }
body.index-paper .right .tool {
  background: var(--paper-soft) !important; color: var(--paper-green) !important; border-color: var(--paper-border) !important;
  box-shadow: none; font-size: 1rem; justify-content: flex-start;
}
body.index-paper .right .tool:hover { background: var(--paper-result) !important; }
body.index-paper .right .tools-disabled { opacity: 1; }
body.index-paper .right #chatBadge { opacity: 1 !important; color: var(--paper-muted); }
body.index-paper #chatModal .chatbox { background: var(--paper-surface); }
body.index-paper #chatModal :is(.chat-header,.chat-form,.preview-wrap,#replyPreview) {
  background: var(--paper-soft) !important; color: var(--paper-ink); border-color: var(--paper-border) !important;
}
body.index-paper #chatModal :is(#replyAuthor,#replyExcerpt,#cancelReply,.preview-remove) { color: var(--paper-green) !important; opacity: 1 !important; }
body.index-paper #chatModal .chat-form input { background: var(--paper-surface); color: var(--paper-ink); border: 1px solid var(--paper-border); min-width: 0; }
body.index-paper #chatModal .chat-form button { background: var(--paper-result) !important; color: var(--paper-green) !important; }
body.index-paper #chatModal .message .msg-quote { background: var(--paper-soft); color: var(--paper-ink); }
body.index-paper #chatModal .message :is(.msg-header,.msg-time) { color: inherit; opacity: 1; }
body.index-paper #chatModal .message.me { background: var(--paper-green); color: #fffef9; }
body.index-paper #chatModal .message.other { background: var(--paper-soft); color: var(--paper-ink); }
body.index-paper #chatModal .message :is(p,a) { color: inherit; }
body.index-paper #chatModal .react-btn { background: var(--paper-surface) !important; color: var(--paper-green) !important; border: 1px solid var(--paper-border); }
body.index-paper .page :is(button,a):focus-visible { outline: 3px solid var(--paper-green); outline-offset: 4px; }
body.index-paper .page button:disabled { background: var(--paper-soft) !important; color: var(--paper-muted) !important; cursor: not-allowed; opacity: 1; }
@media(max-width:600px) {
  body.index-paper.mode-right .right { grid-template-columns: 1fr; gap: 16px; }
  body.index-paper .right > section { padding: 20px; }
  body.index-paper .runner-view-heading { padding: 20px; padding-top: 100px; }
  body.index-paper .runner-view-heading::before { inset: 16px 16px auto auto; width: 104px; height: 70px; }
  body.index-paper #blogList { gap: 16px; }
  body.index-paper .articles .article > div:not(.thumb) { padding: 18px; }
}
