/* Integration rules for server-rendered cards and native page content. */

/* A wider desktop sheet gives images, cards and the archive room to breathe.
   Text measures are independent of the shared page frame. */
.sheet { max-width:75rem; }
:where(body:not(.home) .sheet main) :where(p,blockquote) { max-width:70ch; }
.story-content :where(ul,ol),
:where(body:not(.home)) #main > :where(ul,ol),
:where(body:not(.home)) #main .dc-section > :where(ul,ol),
:where(body:not(.home)) #main .dc-section > .wp-block-group__inner-container > :where(ul,ol) { max-width:70ch; }
.sheet > footer { max-width:none; }
.sheet > footer > p { max-width:70ch; }

.dcr-home .dcl-hero { margin-top:1rem; padding-bottom:1rem; }
.dcr-home .dcl-hero .tally { font-size:clamp(3.6rem,8vw,6rem); }
.dcr-home .dcl-hero .tally--sm { font-size:clamp(2rem,4vw,3rem); }
.dcr-home .calc { margin-top:1rem; }
.dcr-home .dcr-feature-grid { margin-bottom:1.8rem; }
.dcr-feature-card figure { margin:0 0 1rem; }
.dcr-feature-card img { width:100%; height:auto; aspect-ratio:16/9; object-fit:cover; display:block; }
.dcr-home .kicker { margin:1.25rem 0 .35rem; }
.dcr-home h1 { margin-top:1.5rem; }
.dcr-home .dcr-compact-clock .symbolic-clock { margin:0; }
.dcr-home .dcr-visual-link { margin-block:1rem 1.8rem; }
.dcr-home .dcr-visual-link figure { margin:0 0 .8rem; }
.dcr-home .dcr-visual-link img { display:block; width:100%; height:auto; max-height:340px; aspect-ratio:16/7; object-fit:cover; border:1px solid var(--rule,#9fae9b); }
.dcr-home .dcr-visual-link figcaption { font-size:12px; line-height:1.6; color:var(--faint,#5d6a5c); margin-top:.6rem; }

/* The dynamic feed emits articles instead of Gutenberg Group cards. */
.dcr-watch-card { display:flex; flex-direction:column; min-width:0; border:1px solid var(--rule,#9fae9b); padding:1rem; background:var(--paper,#edefe3); }
.dcr-watch-card h3 { margin:0 0 .5rem; }
.dcr-watch-card p { max-width:70ch; margin:.4rem 0 .7rem; font-size:13px; line-height:1.65; overflow-wrap:break-word; }
.dcr-watch-card .sub { margin-top:.6rem; margin-bottom:.4rem; font-size:12px; line-height:1.65; color:var(--faint,#5d6a5c); }
.dcr-watch-card > p:last-child { margin-top:auto; margin-bottom:0; padding-top:.35rem; }
.dcr-watch-card > p > a,.dcr-evidence-card > p > a { min-height:44px; display:inline-flex; align-items:center; line-height:1.4; font-size:13px; }
.dcr-evidence-feed { margin:1rem 0 1.8rem; }
.dcr-evidence-feed > .dcr-evidence-card { margin:0 0 1rem; padding:1rem 1.15rem; }
.dcr-evidence-feed > .dcr-evidence-card:last-child { margin-bottom:0; }
.dcr-evidence-card > .sub { margin-block:.6rem .35rem; font-size:12px; line-height:1.65; color:var(--ink,#283029); }
/* Unsupported :has gracefully leaves the links as stacked paragraphs. */
.dcr-evidence-card > p:has(> a:only-child) { display:inline-block; margin:.2rem 1rem 0 0; vertical-align:top; }
.dcr-evidence-card > p:has(> a:only-child) > a { max-width:100%; }

/* Numeric labels describe each bar without relying on its colour or length. */
.dcr-clock-history { margin:1.2rem 0 1.7rem; }
.dcr-clock-history figcaption { font-size:13px; line-height:1.65; margin-bottom:1rem; max-width:70ch; }
.dcr-clock-history ol { padding:0; list-style:none; margin:.8rem 0; }
.dcr-clock-history li { display:grid; grid-template-columns:3.4rem minmax(40px,1fr) 6.5rem; gap:.7rem; align-items:center; font-size:12px; line-height:1.5; margin:.85rem 0; }
.dcr-clock-history li > strong { text-align:right; font-variant-numeric:tabular-nums; }
.dcr-clock-track { background:var(--bar,#d6e0c8); height:12px; border:1px solid var(--rule,#9fae9b); display:block; }
.dcr-clock-track > span { height:100%; min-width:4px; max-width:100%; background:var(--ink,#283029); display:block; }
.dcr-clock-history + details { margin:1rem 0 1.8rem; }
.dcr-clock-history + details > summary { cursor:pointer; min-height:44px; padding:.65rem 0; font-size:13px; font-weight:600; }
.dcr-scales > .wp-block-group,.dcr-scales > .wp-block-group__inner-container > .wp-block-group { min-width:0; padding:1rem; border:1px solid var(--rule,#9fae9b); background:var(--paper,#edefe3); }
.dcr-scales details { border:1px solid var(--rule,#9fae9b); padding:0; margin:.6rem 0; }
.dcr-scales summary { cursor:pointer; font-weight:600; font-size:13px; line-height:1.55; min-height:44px; padding:.7rem .85rem; }
.dcr-scales details > :not(summary) { margin-inline:.85rem; }
.dcr-article-intro { font-size:1.05rem; max-width:65ch; }
.dcr-article-intro .dcr-hook { font-weight:400; }
.dcr-timeline-section { margin:2rem 0; }
.dcr-timeline-section h2 { margin-bottom:1rem; }
.dcr-timeline-date > span { display:block; font-size:13px; margin-bottom:.3rem; }
.dcr-timeline > li > div > a { display:inline-flex; align-items:center; min-height:44px; font-size:13px; }
.dcr-figure img { display:block; max-width:100%; height:auto; }
.dcr-figure figcaption { font-size:12px; line-height:1.65; max-width:75ch; }
.dcr-editor-placeholder { border:1px solid #9fae9b; padding:1rem; background:#edefe3; color:#283029; }

.dcr-archive { min-width:0; max-width:100%; }
.dcr-archive .dcl-filters { background:var(--bar,#d6e0c8); padding:1rem; border:1px solid var(--rule,#9fae9b); }
.dcr-archive .dcl-filters label { color:var(--ink,#283029); }
.dcr-archive .dcl-filters :is(input,select,button) { min-height:44px; }
.dcr-archive .dcl-result-count { padding:.4rem 0; }
.dcr-archive td .event-note { max-width:65ch; }
.dcr-archive :where(.c-date,.c-left,.c-date em,.c-left em) { white-space:normal; overflow-wrap:anywhere; }
.dcr-home .dcl-quiz,.dcr-home .dcl-random { margin:1rem 0 1.6rem; }
.dcr-home .slot { margin-top:2rem; }
.dcr-home details > summary { cursor:pointer; min-height:44px; padding:.65rem 0; }
.dcr-collection-note { padding:1rem; border-left:3px solid var(--ink,#283029); }
.dcr-clock-history + details > summary:focus-visible,.dcr-scales summary:focus-visible,.dcr-watch-card a:focus-visible,.dcr-evidence-card a:focus-visible,.dcr-timeline a:focus-visible { outline:3px solid var(--stamp,#9a3524); outline-offset:3px; }

@media(max-width:640px) {
  .dcr-clock-history li { grid-template-columns:2.5rem minmax(24px,1fr) 6rem; gap:.55rem; font-size:12px; }
  .dcr-home h1 { font-size:2rem; }
  .dcr-home .lead { font-size:13px; }
  .dcr-home .dcl-hero .cap { min-height:0; }
  .dcr-home .dcl-hero { gap:1rem; }
  .dcr-home .dcr-feature-card,.dcr-evidence-feed > .dcr-evidence-card { padding:1rem; }
  .dcr-archive .dcl-filters { padding:.7rem; }
  .dcr-archive .dcl-filters :is(input,select),.dcr-random-topic select { font-size:16px; }
  .dcr-home .dcr-visual-link img { max-height:240px; aspect-ratio:16/10; }
  .dcr-home .dcr-compact-clock { font-size:12px; }
}
@media(forced-colors:active) {
  .dcr-clock-track,.dcr-watch-card,.dcr-scales details { border-color:CanvasText; }
  .dcr-clock-track > span { background:CanvasText; }
}
