/* "Who am I in the age of AI?" (assets/ai-widget.js). Header and ranked cards come from news-wire-widget.css (.nw-*), like World News Wire. */
.aia { container-type: inline-size; margin: 8px 0 56px; border: 1px solid var(--line, #ebebeb); border-radius: var(--radius, 12px); background: #fff; overflow: hidden; }
.aia[hidden] { display: none; }
.aia .nw-head { position: relative; }
@media (min-width: 561px) { .aia .nw-head { min-height: 53px; box-sizing: border-box; } }
.aia-sub { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.aia-kinds { display: flex; flex-wrap: wrap; gap: 6px; margin-left: auto; }
.aia-kinds:empty { display: none; }
.aia-chip { font: inherit; font-size: 11.5px; font-weight: 600; letter-spacing: 0; text-transform: none; padding: 4px 10px; border: 1px solid var(--line, #ebebeb); border-radius: 999px; background: #fff; color: var(--ink, #0d0d0d); cursor: pointer; transition: background .15s, color .15s, border-color .15s; }
.aia-chip:hover { border-color: var(--red, #b0000e); }
.aia-chip[aria-pressed="true"] { background: var(--red, #b0000e); border-color: var(--red, #b0000e); color: #fff; }
.aia-chip:focus-visible { outline: 2px solid var(--red, #b0000e); outline-offset: 2px; }
.aia .nw-empty[hidden], .aia .nw-feed-wrap[hidden] { display: none; }
/* Lead card: the topic badge sits beside "Top story" without the ▲. */
.aia-wire.nw-ranked .nw-lead .nw-badge-alt { color: #fff; }
.aia-wire.nw-ranked .nw-lead .nw-badge-alt::before { content: none; }
@media (max-width: 560px) { .aia-kinds { margin-left: 0; flex-basis: 100%; } }

a.aia-info, .aia-info { display: inline-flex; align-items: center; gap: 4px; padding: 3px 8px 3px 6px; font: inherit; font-size: 11px; font-weight: 600; color: var(--red, #b0000e); background: var(--red-soft, #fbf1f1); border: 0; border-radius: 999px; cursor: pointer; }
.aia-info::before { content: 'i'; display: inline-grid; place-items: center; width: 13px; height: 13px; border: 1.5px solid currentColor; border-radius: 50%; font: 700 9px/1 Georgia, serif; font-style: italic; }
.aia-info:hover, .aia-info[aria-expanded="true"] { background: var(--red, #b0000e); color: #fff; }
.aia-info:focus-visible { outline: 2px solid var(--red, #b0000e); outline-offset: 2px; }
.aia-about { position: absolute; z-index: 5; top: calc(100% - 6px); left: 12px; right: 12px; max-width: 420px; padding: 12px 14px; border: 1px solid var(--line, #ebebeb); border-radius: 10px; background: #fff; box-shadow: 0 10px 30px rgba(0,0,0,.14); font-size: 12px; line-height: 1.45; color: #4a4a4a; }
.aia-about[hidden] { display: none; }
.aia-about p { margin: 0 0 6px; }
.aia-about a { font-weight: 650; color: var(--red, #b0000e); text-decoration: none; }
.aia-about a:hover { text-decoration: underline; }
.aia-about a::after { content: ' ↗'; }
/* Wide layout (trending-widget.css): directly under World News Wire, same width; Trending stays beside both. */
@media (min-width: 1240px) {
  .wrap:has(> .ytt:not([hidden])) > .aia { grid-column: 1; grid-row: 3; margin: 32px 0 0; }
}

/* AI Builders (assets/ai-builders-widget.js): new AI projects and new developers on GitHub, weekly. */
.aib { margin: 8px 0 56px; }
.aib[hidden] { display: none; }
.aib .ytt-head { background: linear-gradient(100deg, #6e0009, var(--red, #b0000e) 60%, #d4142a); border-bottom: 0; }
.aib .ytt-title { color: #fff; }
.aib .ytt-sym { color: var(--red, #b0000e); background: #fff; }
.aib ol { list-style: none; margin: 0; padding: 8px 12px 12px; display: grid; gap: 6px; }
@media (min-width: 900px) { .aib-repos { grid-template-columns: 1fr 1fr; grid-auto-flow: column; grid-template-rows: repeat(5, auto); } }
.aib-repos .aib-card { cursor: pointer;  display: grid; grid-template-columns: 26px 1fr auto; gap: 2px 10px; padding: 11px 14px; border: 1px solid var(--line, #ebebeb); border-radius: 10px; color: inherit; text-decoration: none; transition: transform .15s, box-shadow .15s, border-color .15s; }
.aib-repos li:hover .aib-card, .aib-repos li.open .aib-card { transform: translateY(-2px); border-color: #eebcbf; box-shadow: 0 6px 18px rgba(176, 0, 14, .12); }
.aib-repos li:first-child .aib-card { background: linear-gradient(135deg, #fdf5f5, #f8dfe0); border-color: #eebcbf; }
.aib-card i { grid-row: 1 / span 2; align-self: center; font: 700 13px/1 ui-monospace, 'SF Mono', Menlo, Consolas, monospace; font-style: normal; color: var(--red, #b0000e); }
.aib-card b { min-width: 0; overflow-wrap: anywhere; font-size: 16px; font-weight: 650; line-height: 1.35; color: #111; }
.aib-card b small { margin-left: 6px; font-size: 12.5px; font-weight: 500; color: #767676; }
.aib-card span { grid-column: 2 / span 2; margin-top: 2px; font-size: 14px; line-height: 1.5; color: #3d3d3d; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.aib-card em { grid-column: 3; grid-row: 1; font: 600 12px/1.4 ui-monospace, 'SF Mono', Menlo, Consolas, monospace; font-style: normal; color: var(--red, #b0000e); white-space: nowrap; }
@media (max-width: 760px) {
  .aib-repos .aib-card { grid-template-columns: 16px 1fr auto; gap: 2px 8px; padding: 10px 12px; }
  .aib-card b { font-size: 15px; }
  .aib-card b small { display: block; margin: 2px 0 0; font-size: 12px; }
  .aib-card span { font-size: 13.5px; -webkit-line-clamp: 2; }
}
.aib-tabs { display: flex; gap: 6px; flex-wrap: wrap; padding: 12px 12px 0; }
.aib-tabs:not(:has(button:not([hidden]))) { display: none; }
.aib-repos li { position: relative; }
.aib-card:focus-visible { outline: 2px solid var(--red, #b0000e); outline-offset: 2px; }
.aib-pop { display: none; margin-top: 6px; padding: 14px 16px; border: 1px solid #eebcbf; border-radius: 10px; background: #fff; box-shadow: 0 10px 28px rgba(0, 0, 0, .14); font-size: 14px; line-height: 1.55; color: #3d3d3d; overflow-wrap: anywhere; }
.aib-pop strong { display: block; font-size: 16px; color: #111; }
.aib-pop p { margin: 6px 0 0; }
.aib-pop .aib-gh { font-size: 13px; color: #555; }
.aib-pop .aib-gh b { font-weight: 650; color: #333; }
.aib-pop .aib-meta { font: 500 12px/1.5 ui-monospace, 'SF Mono', Menlo, Consolas, monospace; color: #767676; }
.aib-pop a { display: inline-block; margin-top: 10px; padding: 7px 14px; border-radius: 999px; background: var(--red, #b0000e); color: #fff; font-size: 13px; font-weight: 650; text-decoration: none; }
.aib-pop a:hover { background: #8a000b; }
.aib-repos li.open .aib-pop { display: block; }
@media (hover: hover) and (min-width: 761px) {
  .aib-pop { position: absolute; left: 0; right: 0; top: 100%; z-index: 20; }
  .aib-repos li:hover .aib-pop, .aib-repos li:focus-within .aib-pop { display: block; }
  .aib-repos li:hover { z-index: 21; }
  .aib-repos li > .aib-card { height: 100%; box-sizing: border-box; }
}
