/* ═══════════════════════════════════════════════════════
   EMERGY AI OPS: AI Daily Brief by week (/brief, /brief/week-<date> and the /he twins).
   Generated pages only (tools/brief_digest.py). Loaded after site.css, brief.css and page.css;
   the item blocks reuse the widget's own classes (brief-chip, brief-sec-h, brief-src ...).
   Logical properties throughout, so the Hebrew pages mirror without extra rules.
   One reading column of 740px at 16.5px, close to the articles (700px at 17px).
   Every link a thumb has to hit is at least 40px tall.
   ═══════════════════════════════════════════════════════ */

.dg-hero { padding-bottom: 56px; }
.dg-hero .page-hero-grid.solo { max-width: 740px; }
.dg-hero .page-h1 em { display: block; }  /* the dates, or the second half of the index title, on their own line */
.dg-hero .page-lede { max-width: 740px; }
.dg-hero .page-lede + .page-lede { margin-top: 12px; }
.dg-hero .crumbs a, .dg-hero .crumbs span[aria-current] { display: inline-flex; align-items: center; min-height: 40px; padding: 0; }
.dg-hero .crumbs { margin-bottom: 10px; }
.pg.dg { padding-top: clamp(40px, 5vw, 64px); }
.dg-inner { max-width: 740px; margin: 0 auto; }
.dg-inner .pg-head { margin-bottom: 30px; }
.dg-nb { white-space: nowrap; }

/* Under the opening: the line an older week gains, who runs the brief (index), the way to the running week (index) */
.dg-older, .dg-by { margin-top: 16px; font-size: 14.5px; line-height: 1.7; color: var(--dim); max-width: 740px; }
.dg-older a, .dg-by a, .dg-more a, .dg-services a {
    color: var(--sky); text-decoration: underline; text-decoration-color: rgba(139, 213, 255, 0.4); text-underline-offset: 3px;
}
.dg-more a, .dg-services a { display: inline-flex; align-items: center; min-height: 40px; }
/* inside a sentence: the padding makes the tap area 40px tall without moving the lines */
.dg-older a, .dg-by a { padding: 12px 0; }
.dg-older a:hover, .dg-by a:hover, .dg-more a:hover, .dg-services a:hover { color: var(--text); }
.dg-now { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; margin-top: 24px; }
.dg-now p { flex: 1 1 280px; font-size: 14.5px; line-height: 1.65; color: var(--muted); }

/* The week by tool: one row per product, every title a link to its block */
.dg-toc { padding: 24px 26px 16px; border: 1px solid var(--line); border-radius: var(--radius-card); background: rgba(12, 26, 46, 0.5); scroll-margin-top: 96px; }
.dg-k { font-family: var(--mono); font-size: 11px; font-weight: 500; letter-spacing: 0.2em; text-transform: uppercase; color: var(--sky); margin-bottom: 8px; }
.dg-toc dl > div { display: grid; grid-template-columns: 168px minmax(0, 1fr); gap: 6px 18px; padding: 8px 0; border-top: 1px solid var(--line-soft); }
.dg-toc dl > div:first-child { border-top: 0; }
.dg-toc dt { padding-top: 9px; }
.dg-toc dd a { display: block; padding: 9px 0; font-size: 15px; line-height: 1.5; color: #D6E2F5; text-decoration: none; }
.dg-toc dd a:hover { color: var(--sky); text-decoration: underline; text-underline-offset: 3px; }

/* Day heading, with the way back to the list (a week page is long on a phone) */
.dg-day {
    display: flex; align-items: center; gap: 12px; margin: 44px 0 14px; min-height: 40px;
    font-family: var(--mono); font-size: 12px; font-weight: 500; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted);
    scroll-margin-top: 96px;
}
.dg-day::after { content: ''; flex: 1; height: 1px; background: var(--line); order: 1; }
.dg-back {
    order: 2; display: inline-flex; align-items: center; min-height: 40px; white-space: nowrap;
    font-size: 11px; letter-spacing: 0.14em; color: var(--sky); text-decoration: none;
}
.dg-back::before { content: '\2191'; margin-inline-end: 6px; }
.dg-back:hover { color: var(--text); }

/* One item, one block; the id on the block is the item id */
.dg-item {
    margin-bottom: 18px; padding: 28px 30px 24px; scroll-margin-top: 96px;
    border: 1px solid var(--line); border-radius: var(--radius-card);
    background: linear-gradient(180deg, rgba(14, 30, 52, 0.72), rgba(8, 17, 32, 0.78));
}
.dg-item:target { border-color: var(--line-strong); box-shadow: 0 0 0 1px rgba(56, 189, 248, 0.25), 0 30px 70px -40px rgba(56, 189, 248, 0.35); }
.dg-top { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; }
.dg-top .brief-when { white-space: normal; }
.dg-title { margin-top: 14px; font-family: var(--grotesk); font-size: clamp(20px, 2.3vw, 24px); font-weight: 600; letter-spacing: -0.012em; line-height: 1.28; color: var(--text); text-wrap: balance; }
.dg-title a { color: inherit; text-decoration: none; }
.dg-title a:hover { color: var(--sky); }
/* the summary reads first: full brightness and a size up; the detail under it steps back a little */
.dg-sum { margin-top: 12px; font-size: 17px; line-height: 1.75; color: var(--text); }
.dg-fields .brief-sec-p { font-size: 16.5px; line-height: 1.8; color: #C3D0E6; }
.dg-fields .brief-sec-p.is-soft { color: var(--muted); }
.dg-fields .brief-watch { margin-top: 22px; }
.dg-fields .brief-watch .brief-sec-h { margin-top: 0; }
.dg-item h4.brief-sec-h { font-weight: 400; }
.dg-item .brief-sources { margin-top: 2px; }
.dg-src { align-items: flex-start; }
.dg-src-main { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.dg-src-title { font-size: 13.5px; color: var(--muted); overflow-wrap: anywhere; }
.dg-src .brief-src-meta { padding-top: 3px; }
.dg-src .brief-src-meta b { margin-inline: 6px 0; }

/* Previous and next week, the note under the list, the links under the contact buttons */
.dg-nav { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0 24px; margin-top: 36px; padding-top: 14px; border-top: 1px solid var(--line-soft); }
.dg-nav .text-link, .dg-more .text-link { display: inline-flex; align-items: center; min-height: 44px; padding: 0; }
.dg-nav .dg-next { margin-inline-start: auto; }
.dg-note { margin-top: 16px; font-size: 14px; line-height: 1.7; color: var(--dim); }
.dg-more { display: flex; flex-wrap: wrap; align-items: center; gap: 0 28px; margin-top: 6px; font-size: 14px; }
.pg-title.dg-cta-title { font-size: clamp(22px, 2.6vw, 30px); line-height: 1.25; }
.dg-services { display: flex; flex-wrap: wrap; justify-content: center; gap: 0 28px; margin-top: 18px; font-size: 14.5px; }

/* Index: one card per week */
.dg-weeks { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; }
.dg-week { display: flex; flex-direction: column; gap: 12px; padding: 26px 28px 22px; text-decoration: none; color: inherit; }
.dg-week-n { font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--mint); }
.dg-week-t { font-family: var(--grotesk); font-size: 22px; font-weight: 600; letter-spacing: -0.012em; line-height: 1.25; color: var(--text); }
.dg-week-tools { display: flex; flex-wrap: wrap; gap: 6px; }
.dg-week-leads { list-style: none; display: grid; gap: 6px; }
.dg-week-leads li { position: relative; padding-inline-start: 16px; font-size: 15px; line-height: 1.6; color: #C3D0E6; }
.dg-week-leads li::before { content: ''; position: absolute; inset-inline-start: 2px; top: 0.62em; width: 5px; height: 5px; border-radius: 1px; background: var(--cyan); transform: rotate(45deg); }
.dg-week-go { margin-top: auto; padding-top: 6px; font-family: var(--mono); font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--sky); }

/* Hebrew: no capitals and no wide tracking on Hebrew labels (as assets/rtl.css does for the other pages) */
[dir=rtl] .dg-k, [dir=rtl] .dg-day, [dir=rtl] .dg-week-n, [dir=rtl] .dg-week-go, [dir=rtl] .dg-top .brief-when, [dir=rtl] .dg-back {
    font-family: var(--sans); font-size: 13px; letter-spacing: 0.02em; text-transform: none;
}
[dir=rtl] .dg-day { font-size: 14px; font-weight: 500; }
[dir=rtl] .dg-title, [dir=rtl] .dg-week-t { letter-spacing: 0; }
[dir=rtl] .dg-item .brief-watch { padding: 2px 14px 2px 0; }
/* a source is an English line inside a Hebrew page: it reads left to right and starts at the left edge */
[dir=rtl] .dg-src { text-align: left; }
[dir=rtl] .dg-src .brief-src-meta { font-family: var(--sans); font-size: 12.5px; letter-spacing: 0.02em; text-transform: none; }
[dir=rtl] .dg-src .brief-src-meta b { margin: 0 0 0 6px; }

@media (max-width: 768px) {
    .dg-hero { padding-bottom: 44px; }
    .dg-toc { padding: 20px 18px 10px; }
    .dg-toc dl > div { grid-template-columns: minmax(0, 1fr); gap: 0; }
    .dg-toc dt { padding-top: 6px; }
    .dg-item { padding: 22px 18px 18px; }
    .dg-week { padding: 22px 20px 20px; }
    .dg-src { flex-direction: column; gap: 6px; }
    .dg-nav { flex-direction: column; }
    .dg-nav .dg-next { margin-inline-start: 0; }
    .dg-now .btn-ghost { width: 100%; max-width: 360px; justify-content: center; }
    /* On a phone the floating brief pill sits on the reading column of these long pages and covers a line of
       text wherever the reader stops. The panel stays one tap away: the "Today in AI" button on each page. */
    .dg-page .brief-launcher { display: none; }
}
