/* DC Blueprints · Toolkit: catalogue pages. Values come from tokens.css. */

.volumes { display: inline-flex; gap: 2px; padding: 4px; margin-left: var(--s-4); border-radius: var(--r-pill); background: var(--surface-2); }
.volumes a { display: inline-flex; align-items: center; height: 36px; padding: 0 var(--s-4); border-radius: var(--r-pill); font-size: 14px; font-weight: 600; text-decoration: none; color: var(--muted-foreground); }
.volumes a::before { content: ""; position: absolute; }
.volumes a[aria-current="page"] { background: var(--popover); color: var(--foreground); box-shadow: var(--edge); }
.volumes a:hover { color: var(--foreground); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

.tk-stats { display: flex; flex-wrap: wrap; gap: var(--s-3); margin-top: var(--s-6); }
.tk-stats div { padding: var(--s-3) var(--s-5); border-radius: var(--r-lg); background: var(--card); }
.tk-stats strong { display: block; font-size: 28px; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.tk-stats span { font-size: 13px; color: var(--muted-foreground); }
.tk-split { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s-4); margin-top: var(--s-8); }
.tk-door { display: grid; gap: var(--s-2); padding: var(--s-6); border-radius: var(--r-xl); background: var(--card); text-decoration: none; transition: box-shadow 200ms var(--ease-out); }
.tk-door:hover { box-shadow: inset 0 0 0 1px var(--border-strong); }
.tk-door b { font-size: 24px; letter-spacing: -0.02em; }
.tk-door span { color: var(--muted-foreground); }
.tk-door em { font-style: normal; font-weight: 700; color: var(--accent-text); }

.tk-filters { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-3); margin-bottom: var(--s-5); }
.tk-filters .seg { margin: 0; flex-wrap: wrap; border-radius: var(--r-lg); }
.tk-search { flex: 1 1 260px; }
.tk-search input { width: 100%; height: 44px; padding: 0 var(--s-4); border: 0; border-radius: var(--r-pill); background: var(--card); color: var(--foreground); font: 500 16px var(--font); box-shadow: inset 0 0 0 1px var(--border); }
.tk-search input:focus { outline: none; box-shadow: inset 0 0 0 2px var(--ring); }
.tk-count { margin: calc(var(--s-3) * -1) 0 var(--s-4); font-size: 14px; color: var(--muted-foreground); }

.tk-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: var(--s-3); }
.tk-card { display: grid; align-content: start; gap: var(--s-2); width: 100%; padding: var(--s-5); border: 0; border-radius: var(--r-lg); background: var(--card); color: var(--foreground); font: inherit; text-align: left; cursor: pointer; transition: box-shadow 200ms var(--ease-out), transform 160ms var(--ease-out); }
.tk-card:hover { box-shadow: inset 0 0 0 1px var(--border-strong); }
.tk-card:active { transform: scale(0.99); }
.tk-card .top { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--s-2); }
.tk-card h3 { font-size: 18px; overflow-wrap: anywhere; }
.tk-card .kind { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--accent-text); }
.tk-card p { font-size: 15px; color: var(--muted-foreground); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.tk-card .meta { display: flex; flex-wrap: wrap; gap: var(--s-2); margin-top: var(--s-1); }
.tk-tag { display: inline-flex; align-items: center; height: 24px; padding: 0 8px; border-radius: 6px; background: var(--surface-2); font-size: 12px; font-weight: 600; color: var(--muted-foreground); white-space: nowrap; }
.tk-empty { padding: var(--s-6); border-radius: var(--r-lg); background: var(--card); color: var(--muted-foreground); }

dialog.tk-dialog { width: min(720px, calc(100vw - 32px)); max-height: min(86vh, 900px); padding: var(--s-6); overflow-y: auto; }
.tk-dialog h4#detail-title { font-size: 26px; letter-spacing: -0.02em; padding-right: var(--s-7); margin-bottom: var(--s-1); }
.tk-dialog .sub-line { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-2); margin-bottom: var(--s-4); font-size: 14px; color: var(--muted-foreground); }
.tk-dialog .sub-line a { color: var(--accent-text); text-underline-offset: 3px; overflow-wrap: anywhere; }
.tk-dialog p { margin-bottom: 0; }
.tk-dl { display: grid; gap: var(--s-4); margin: var(--s-4) 0 0; }
.tk-dl > div { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: var(--s-3); }
.tk-dl dt { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted-foreground); padding-top: 3px; }
.tk-dl dd { margin: 0; font-size: 15px; color: var(--foreground); overflow-wrap: anywhere; }
.tk-dl dd ul { margin: 0; padding-left: 18px; display: grid; gap: 4px; }
.tk-cmd { display: flex; align-items: flex-start; gap: var(--s-2); margin-bottom: var(--s-2); }
.tk-cmd code { flex: 1; display: block; padding: var(--s-2) var(--s-3); border-radius: var(--r-sm); background: var(--surface-2); font-size: 13px; white-space: pre-wrap; overflow-wrap: anywhere; }
.tk-cmd .copy-chip { flex: none; }
.tk-contents { max-height: 260px; overflow-y: auto; }

.tk-levels { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s-3); }
.tk-levels > div { display: grid; gap: var(--s-2); align-content: start; padding: var(--s-5); border-radius: var(--r-lg); background: var(--card); }
.tk-levels .badge { justify-self: start; }
.tk-levels p { font-size: 15px; color: var(--muted-foreground); }
.tk-steps { display: grid; gap: var(--s-3); margin: 0; padding-left: 22px; max-width: 75ch; }
.tk-steps li { color: var(--muted-foreground); }
.tk-steps strong { color: var(--foreground); }

.tk-picks { display: grid; gap: var(--s-3); }
.tk-pick { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: var(--s-4); padding: var(--s-4) var(--s-5); border-radius: var(--r-md); background: var(--card); }
.tk-pick h4 { font-size: 16px; }
.tk-pick p { font-size: 15px; color: var(--muted-foreground); }
.tk-pick a { color: var(--accent-text); font-weight: 600; text-underline-offset: 3px; }

@media (max-width: 560px) {
  /* Four volumes don't fit next to the logo on a phone: the switch scrolls in its own strip, like the section nav. */
  .volumes { flex: 0 1 auto; min-width: 0; overflow-x: auto; scrollbar-width: none; }
  .volumes::-webkit-scrollbar { display: none; }
  .volumes a { flex: none; white-space: nowrap; }
}
@media (max-width: 420px) {
  /* Room for the volume switch on small phones: the stress-test toggle is a desktop review tool. */
  .topbar { gap: var(--s-2); }
  .topbar .switch { display: none; }
}
@media (max-width: 760px) {
  .volumes { margin-left: var(--s-2); }
  .volumes a { padding: 0 var(--s-3); }
  .brand span { display: none; }
  .tk-split,
  .tk-levels { grid-template-columns: minmax(0, 1fr); }
  .tk-pick,
  .tk-dl > div { grid-template-columns: minmax(0, 1fr); gap: var(--s-1); }
  dialog.tk-dialog { padding: var(--s-5); }
}
