/* Compact image and numbered, plain-text download list (v0.1.5). */
.boone-work {
  --bg-card: #141619;
  --bg-inner: #1e2126;
  --text-main: #f0f2f5;
  --text-muted: #9ba1ab;
  --border-color: #2c3038;
  /* Adjust these values for each site's final layout. */
  --work-image-max-width: 480px;
  --work-image-max-height: 320px;
  --work-link-row-padding: 10px;
  --work-link-color: #c4a7ff;

  background-color: var(--bg-card);
  color: var(--text-main);
  border: 1px solid var(--border-color);
  border-radius: 4px;
  padding: 20px;
  width: 100%;
  min-width: 0;
  max-width: 840px;
  margin: 0 auto;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  box-sizing: border-box;
  overflow-wrap: anywhere;
  box-shadow: none;
}

.boone-work *,
.boone-work::before,
.boone-work::after,
.boone-work *::before,
.boone-work *::after {
  box-sizing: inherit;
}

.boone-work__image {
  display: flex;
  justify-content: center;
  width: 100%;
  margin-bottom: 24px;
}

.boone-work__image img {
  display: block;
  width: auto;
  max-width: min(100%, var(--work-image-max-width));
  max-height: var(--work-image-max-height);
  height: auto;
  margin: 0 auto;
  border-radius: 2px;
  object-fit: contain;
}

.boone-work__description {
  font-size: 1rem;
  line-height: 1.7;
  color: var(--text-main);
  margin-bottom: 24px;
  padding: 0 4px;
}

.boone-work__description p {
  margin: 0 0 12px;
}

/* The receiver already renders line breaks with nl2br; avoid doubling them. */
.boone-work__description p:last-child {
  margin-bottom: 0;
}

.boone-work__facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(140px, 100%), 1fr));
  gap: 12px;
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
  padding: 14px 0;
  margin: 0 0 20px;
}

.boone-work__facts .fact-item {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.boone-work__facts dt {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.boone-work__facts dd {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: #fff;
}

.boone-work__categories {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  list-style: none;
  padding: 0;
  margin: 0 0 28px;
}

/* Categories are labels until real category archive routes are available. */
.boone-work__categories > li {
  display: inline-block;
  min-width: 0;
  max-width: 100%;
  color: var(--text-muted);
  padding: 0;
  font-size: 0.85rem;
  line-height: 1.4;
}

.boone-work__categories > li + li::before {
  content: "/";
  margin-right: 8px;
  color: var(--border-color);
}

.boone-work__links {
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 0;
}

.boone-work__links .links-heading {
  margin: 0 0 8px;
  text-align: left;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-muted);
}

.boone-work__links .dl-btn {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-start;
  gap: 4px 16px;
  min-width: 0;
  max-width: 100%;
  min-height: 44px;
  padding: var(--work-link-row-padding) 0;
  border: 0;
  border-radius: 0;
  background: none;
  box-shadow: none;
  text-decoration: none;
  color: var(--work-link-color);
  font-weight: 500;
  line-height: 1.5;
  text-align: left;
  white-space: normal;
  -webkit-tap-highlight-color: rgb(196 167 255 / 20%);
}

.boone-work__download-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.boone-work__download-row {
  margin: 0;
  padding: 0;
  border-bottom: 1px solid var(--border-color);
}

.boone-work__download-row:last-child { border-bottom: 0; }

.boone-work__links .boone-work__filename {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.95rem;
  text-decoration: underline;
  text-underline-offset: 3px;
  overflow-wrap: anywhere;
}

.boone-work__links .boone-work__size,
.boone-work__links .boone-work__service {
  font-size: 0.85rem;
  font-weight: 400;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}

.boone-work__links .boone-work__service { margin-left: auto; }

/* The editable dashboard uses the approved restrained DDownload emphasis. */
.boone-work--editable {
  border-radius: 12px;
}

.boone-work--editable .boone-work__links .dl-btn {
  min-height: 48px;
  padding: 14px 12px;
  gap: 4px 12px;
}

.boone-work--editable .boone-work__links .dl-btn--ddownload {
  margin-bottom: 6px;
  border: 1px solid #8567b7;
  border-radius: 6px;
  background: #292233;
}

.boone-work--editable .boone-work__links .boone-work__service {
  order: -1;
  margin-left: 0;
  margin-right: auto;
  color: var(--work-link-color);
  font-size: 0.95rem;
  font-weight: 700;
}

@media (hover: hover) {
  .boone-work__links .dl-btn:hover {
    color: #dfcdff;
  }
}

.boone-work__links .dl-btn:active {
  color: #dfcdff;
}

.boone-work__links .dl-btn:focus-visible {
  outline: 3px solid #fff;
  outline-offset: 4px;
}

.boone-work__links .btn-main-text {
  min-width: 0;
  font-size: 1rem;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.boone-work__links .btn-sub-text {
  min-width: 0;
  font-size: 0.85rem;
  font-weight: 400;
  color: var(--text-muted);
  margin: 0;
}

@media (min-width: 768px) {
  .boone-work {
    padding: 24px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .boone-work__image img,
  .boone-work__links .dl-btn {
    transition: none;
    animation: none;
  }

  .boone-work__links .dl-btn:hover,
  .boone-work__links .dl-btn:active {
    transform: none;
  }
}
