/* elitesoft — EliteBlog (inc/views-eliteblog.php): one row per maker, its topics inside, the
 * articles inside each topic. Native <details>: works with the keyboard and without JavaScript;
 * where the browser can, the rows open and close smoothly. */

.eb { interpolate-size: allow-keywords; }
.eb-makers { display: grid; gap: 16px; }

.eb details > summary { list-style: none; cursor: pointer; }
.eb details > summary::-webkit-details-marker { display: none; }
.eb details > summary:focus-visible { outline: 2px solid var(--tungsten); outline-offset: 4px; }
.eb details::details-content { block-size: 0; overflow: clip; transition: block-size 320ms var(--ease-out), content-visibility 320ms allow-discrete; }
.eb details[open]::details-content { block-size: auto; }

/* the chevron of a row */
.eb-chev { position: relative; width: 36px; height: 36px; flex: none; border: 1px solid var(--line-2); border-radius: 50%; transition: transform 260ms var(--ease-out), border-color 200ms ease; }
.eb-chev::before { content: ''; position: absolute; left: 50%; top: 46%; width: 9px; height: 9px; border: solid var(--ink); border-width: 0 1.6px 1.6px 0; transform: translate(-50%, -50%) rotate(45deg); }
.eb details[open] > summary > .eb-chev { transform: rotate(180deg); border-color: var(--tungsten); }

/* a maker */
.eb-maker { border: 1px solid var(--line-2); border-radius: var(--r-sm); background: rgba(18, 23, 30, .55); }
.eb-maker[open] { border-color: rgba(242, 176, 94, .45); }
.eb-maker > summary { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "name chev" "about chev" "count chev"; column-gap: 20px; row-gap: 6px; align-items: center; padding: 26px 28px; }
.eb-maker__name { grid-area: name; font: 600 clamp(26px, 3vw, 38px)/1.1 var(--display); color: var(--ink); }
.eb-maker__about { grid-area: about; max-width: 70ch; color: var(--ink-soft); font-size: var(--t-sm); line-height: 1.5; }
.eb-maker__count { grid-area: count; color: var(--tungsten); font-size: var(--t-xs); font-variant-numeric: tabular-nums; }
.eb-maker > summary > .eb-chev { grid-area: chev; }
@media (hover: hover) and (pointer: fine) {
	.eb details > summary:hover > .eb-chev { border-color: var(--tungsten); }
}
.eb-maker__body { padding: 0 28px 26px; }
.eb-maker__links { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; margin: 0 0 18px; color: var(--muted); font-size: var(--t-xs); }

/* a topic */
.eb-topic { border-top: 1px solid var(--line-2); }
.eb-topic > summary { display: flex; align-items: center; gap: 14px; padding: 16px 0; }
.eb-topic__name { flex: 1; font: 600 var(--t-lg)/1.3 var(--sans); color: var(--ink); }
.eb-topic__count { min-width: 28px; padding: 3px 8px; border-radius: var(--r-pill); background: rgba(255, 255, 255, .06); color: var(--muted); font-size: var(--t-xs); text-align: center; font-variant-numeric: tabular-nums; }
.eb-topic > summary > .eb-chev { width: 30px; height: 30px; }
.eb-topic[open] .eb-topic__name { color: var(--tungsten); }

/* the articles */
.eb-posts { list-style: none; margin: 0 0 8px; padding: 0 0 0 2px; display: grid; gap: 4px; }
.eb-posts li { display: grid; grid-template-columns: 92px minmax(0, 1fr); column-gap: 18px; padding: 12px 0; border-top: 1px dashed rgba(238, 234, 227, .1); }
.eb-posts li:first-child { border-top: 0; }
.eb-posts time { grid-row: span 2; padding-top: 3px; color: var(--muted); font-size: var(--t-xs); font-variant-numeric: tabular-nums; }
.eb-posts h3 { margin: 0 0 4px; font: 600 var(--t-sm)/1.4 var(--sans); }
.eb-posts h3 a { color: var(--ink); text-decoration: underline; text-decoration-color: rgba(242, 176, 94, .5); text-underline-offset: 3px; }
.eb-posts h3 a:hover { color: var(--tungsten); }
.eb-posts p { margin: 0; max-width: 75ch; color: var(--ink-soft); font-size: var(--t-sm); line-height: 1.5; }

@media (max-width: 640px) {
	.eb-maker > summary { padding: 20px 16px; column-gap: 12px; }
	.eb-maker__body { padding: 0 16px 20px; }
	.eb-posts li { grid-template-columns: minmax(0, 1fr); }
	.eb-posts time { grid-row: auto; padding: 0 0 2px; }
}
@media (prefers-reduced-motion: reduce) {
	.eb details::details-content, .eb-chev { transition: none; }
}
