/* Additions on top of the main site's style.css, using its tokens. */
.title { font-size: clamp(1.8rem, 3.6vw, 2.6rem); margin-bottom: 28px; }
.crumbs { color: var(--muted); font-size: 15px; margin-bottom: 32px; display: flex; gap: 8px; flex-wrap: wrap; }
.crumbs a:hover { color: var(--ink); }
.crumbs b { color: var(--ink); font-weight: 500; }

/* List: row opens details, button downloads */
.dir { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.dir li { border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 12px; padding-right: 8px; }
.dir .main { flex: 1; min-width: 0; display: grid; grid-template-columns: 64px minmax(0, 1fr) auto; gap: 20px; align-items: center;
  padding: 18px 8px; border-radius: 22px; transition: background .3s var(--ease); }
.dir .main:hover { background: rgba(var(--fg), .04); }
.dir .main:hover .ico { transform: translateY(-4px); background: rgba(var(--fg), .1); }
.dir .ico { color: var(--ink); }
.dir .n { font-size: 18px; }
.dir .n small { display: block; color: var(--muted); font-size: 14px; font-weight: 400; }
.dir .f { color: var(--muted); font-size: 14px; font-variant-numeric: tabular-nums; }
.dir .dl { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; flex: none;
  background: rgba(var(--fg), .08); color: var(--ink); transition: background .3s var(--ease), color .3s var(--ease); }
.dir .dl:hover { background: var(--ink); color: var(--bg); }
.dir .dl svg { width: 18px; height: 18px; }
.dir .empty { color: var(--muted); padding: 18px 8px; }

/* Details page */
.item-head { display: flex; align-items: center; gap: 20px; }
.item-head h1 { font-size: clamp(2rem, 4.4vw, 3.2rem); letter-spacing: -0.05em; }
.item-file { color: var(--muted); font-size: 15px; }
.about { margin-top: 28px; display: grid; gap: 12px; max-width: 62ch; }
.about p { color: var(--muted); font-weight: 400; letter-spacing: -0.01em; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 28px; }
.actions .pill-link svg, .pill-ghost svg { width: 18px; height: 18px; }
.pill-ghost { all: unset; cursor: pointer; display: inline-flex; align-items: center; gap: 10px; padding: 14px 20px; border-radius: 999px;
  font-size: 16px; color: var(--ink); background: rgba(var(--fg), .06); box-shadow: inset 0 0 0 1px var(--line);
  transition: background .3s var(--ease); }
.pill-ghost:hover, .pill-ghost[aria-expanded="true"] { background: rgba(var(--fg), .12); }
.pill-ghost:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
.item-specs { margin-top: 40px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.item-specs .spec b { font-size: clamp(1.1rem, 2vw, 1.4rem); }

.zcontents { margin-top: 48px; }
.zcontents h2 { font-size: 20px; }
.zcontents .hint { color: var(--muted); font-weight: 400; font-size: 15px; margin: 6px 0 16px; }
.plist, .plist .sub { list-style: none; margin: 0; padding: 0; }
.plist { border-top: 1px solid var(--line); }
.plist > li { border-bottom: 1px solid var(--line); }

/* One row layout for files and folders: icon | label + file name | size | button */
.prow { display: grid; grid-template-columns: 22px minmax(0, 1fr) auto 32px; gap: 16px; align-items: center; padding: 12px 6px; }
summary.prow { cursor: pointer; list-style: none; border-radius: 10px; }
summary.prow::-webkit-details-marker { display: none; }
summary.prow:hover { background: rgba(var(--fg), .04); }
.plist .pi { display: grid; place-items: center; color: var(--muted); }
.plist .pi svg { width: 18px; height: 18px; }
.plist .pt { display: grid; min-width: 0; }
.plist .pt b { font-weight: 500; font-size: 16px; }
.plist .pt small { color: var(--muted); font-size: 13px; font-weight: 400; overflow-wrap: anywhere; }
.plist .ps { color: var(--muted); font-size: 14px; text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.plist .pd, .plist .chev { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; color: var(--ink); }
.plist .pd { background: rgba(var(--fg), .08); transition: background .3s var(--ease), color .3s var(--ease); }
.plist .pd:hover { background: var(--ink); color: var(--bg); }
.plist .pd svg { width: 16px; height: 16px; }
.plist .chev svg { width: 18px; height: 18px; color: var(--muted); transition: transform .3s var(--ease); }
.plist details[open] .chev svg { transform: rotate(180deg); }

.plist .sub { padding: 0 6px 12px 44px; display: grid; gap: 2px; max-height: 340px; overflow: auto; }
.plist .sub li { display: grid; grid-template-columns: minmax(0, 1fr) auto 28px; gap: 16px; align-items: center; padding: 3px 0; }
.plist .sub .pn { font-size: 13.5px; color: var(--muted); overflow-wrap: anywhere; }
.plist .sub .ps { font-size: 13px; }
.plist .sub .pd { width: 28px; height: 28px; }
.plist .sub .pd svg { width: 14px; height: 14px; }

.licence { margin-top: 28px; color: var(--muted); font-size: 13.5px; font-weight: 400; max-width: 72ch; }

@media (max-width: 760px) {
  .dir .main { grid-template-columns: 48px minmax(0, 1fr); gap: 4px 14px; }
  .dir .ico { grid-row: 1 / span 2; width: 48px; height: 48px; border-radius: 14px; }
  .dir .ico svg { width: 22px; height: 22px; }
  .dir .f { grid-column: 2; }
  .item-specs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .prow { grid-template-columns: 22px minmax(0, 1fr) 32px; gap: 2px 12px; }
  .prow .ps { grid-column: 2; grid-row: 2; text-align: left; }
  .prow .pd, .prow .chev { grid-column: 3; grid-row: 1 / span 2; }
  .plist .pi { grid-row: 1 / span 2; }
  .plist .sub { padding-left: 34px; }
}
