/* Material pages use the same panels, type and orange accent as the portal. */
.fc-detail-page {
  --fd-panel: var(--portal-panel, #1b1e23);
  --fd-raised: var(--portal-raised, #22262d);
  --fd-line: var(--portal-border, #30343c);
  --fd-text: var(--portal-text, #f0f1f3);
  --fd-muted: var(--portal-muted, #9298a3);
  --fd-accent: var(--portal-accent, #f5a53b);
  --fc-bg: var(--fd-panel);
  --fc-soft: var(--fd-raised);
  --fc-line: var(--fd-line);
  --fc-text: var(--fd-text);
  --fc-muted: var(--fd-muted);
  --fc-accent: var(--fd-accent);
  color: var(--fd-text);
}
.fc-detail-page *, .fd-gallery-dialog * { box-sizing: border-box; }
.fc-detail-page .fc-detail-main {
  display: block;
  width: 100%;
  min-width: 0;
  container: file-detail / inline-size;
}
.fc-detail-page .fc-detail-heading.portal-panel {
  padding: 19px 21px !important;
  margin: 0 0 14px !important;
  overflow: visible;
}
.fc-detail-page .fc-detail-heading h1 {
  max-width: none;
  margin: 0;
  font-size: clamp(22px, 2vw, 28px);
  line-height: 1.3;
  letter-spacing: -.025em;
  color: var(--fd-accent);
  text-wrap: pretty;
  overflow-wrap: anywhere;
}
.fc-detail-page .fc-detail-heading .fc-card-categories { margin-bottom: 15px; }
.fc-detail-page .fc-detail-heading .fc-card-categories a {
  color: var(--fd-accent);
  font-size: 11px;
  line-height: 1.5;
}
.fc-detail-page .fc-detail-byline {
  gap: 8px;
  margin-top: 13px;
  color: var(--fd-muted);
  font-size: 12px;
}
.fc-detail-page .fc-detail-byline a { color: var(--fd-muted); }
.fc-detail-page .fc-detail-byline a:hover { color: var(--fd-accent); }
.fc-detail-page .fc-detail-summary {
  max-width: none;
  margin-top: 20px;
  color: #b2b7c0;
  font-size: 14px;
  line-height: 1.85;
}
.fc-detail-page .fc-detail-feedback {
  margin: 0;
  padding: 0;
  border-top: 0;
  gap: 8px;
  color: var(--fd-muted);
  font-size: 12px;
}
.fc-detail-page .fc-detail-feedback .product-like,
.fc-detail-page .fc-detail-feedback .product-stat,
.fc-detail-page .fc-detail-feedback .product-favorite {
  min-height: 34px;
  border-radius: 8px;
  color: var(--fd-muted);
  background: var(--fd-raised);
  border-color: var(--fd-line);
  box-shadow: none;
}
.fc-detail-page .fc-detail-feedback .product-like:hover,
.fc-detail-page .fc-detail-feedback .product-favorite:hover { color: var(--fd-accent); border-color: #765631; }
.fc-detail-page .fc-detail-feedback [aria-pressed="true"] {
  color: var(--fd-accent);
  background: #f5a53b12;
  border-color: #f5a53b54;
}
.fc-detail-page .fc-detail-feedback .like-statistics-button { color: var(--fd-muted); }
.fc-detail-page .fc-detail-feedback .fc-view-count { color: var(--fd-muted); font-size: 12px; }
.fc-detail-page .fc-detail-feedback .product-favorite[aria-pressed="true"] .icon { fill: #f5a53b20; }
.fc-detail-page .fc-detail-feedback .icon { width: 18px; height: 18px; stroke-width: 1.7; }
.fc-detail-page .fd-icon, .fd-gallery-dialog .fd-icon {
  display: block;
  width: 19px;
  height: 19px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
  pointer-events: none;
}

/* Gallery: a single frame, clear controls and visible selected previews. */
.fc-detail-page .fd-gallery {
  border: 1px solid var(--fd-line);
  border-radius: 11px;
  background: var(--fd-panel);
  overflow: hidden;
  margin-bottom: 18px;
  min-width: 0;
}
.fd-gallery-toolbar, .fd-gallery-dialog-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding: 16px 20px;
  color: var(--portal-text, #f0f1f3);
  background: var(--portal-panel, #1b1e23);
  border-bottom: 1px solid var(--portal-border, #30343c);
}
.fc-detail-page .fd-gallery-title, .fd-gallery-dialog-title {
  margin: 0;
  font-size: 17px;
  font-weight: 650;
  letter-spacing: -.025em;
  line-height: 1.5;
  min-width: 0;
}
.fd-gallery-dialog-title { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fd-gallery-controls, .fd-gallery-dialog-controls {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-left: auto;
  flex-wrap: wrap;
}
.fd-gallery-controls button,
.fd-gallery-dialog-controls button,
.fd-gallery-dialog-footer button,
.fd-gallery-dialog-footer a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-width: 44px;
  min-height: 44px;
  padding: 9px 11px;
  border: 1px solid var(--portal-border, #30343c);
  border-radius: 8px;
  background: var(--portal-raised, #22262d);
  color: #c1c5cc;
  font: 600 12px/1.3 var(--font, "Segoe UI", Arial, sans-serif);
  cursor: pointer;
  text-decoration: none;
  transition: background .16s, border-color .16s, color .16s;
}
.fd-gallery-controls button:hover:not(:disabled),
.fd-gallery-dialog-controls button:hover:not(:disabled),
.fd-gallery-dialog-footer button:hover:not(:disabled),
.fd-gallery-dialog-footer a:hover {
  color: var(--portal-accent, #f5a53b);
  background: #292c32;
  border-color: #765631;
}
.fd-gallery-controls button:disabled,
.fd-gallery-dialog-controls button:disabled,
.fd-gallery-dialog-footer button:disabled { opacity: .4; cursor: default; }
.fd-gallery-count {
  color: var(--portal-muted, #9298a3);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  padding-inline: 4px;
}
.fc-detail-page .fd-gallery-stage-hint {
  position: absolute;
  right: 14px;
  bottom: 14px;
  padding: 7px 10px;
  border: 1px solid #41454d;
  border-radius: 6px;
  background: #1b1e23e8;
  color: #c8cbd1;
  font-size: 11px;
  line-height: 1.4;
  pointer-events: none;
}
.fc-detail-page .fd-gallery-stage {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  width: 100%;
  padding: 0;
  border: 0;
  background: var(--portal-sidebar, #15171b);
  aspect-ratio: 16 / 9;
  cursor: zoom-in;
  touch-action: pan-y;
  overflow: hidden;
}
.fc-detail-page .fd-gallery-image {
  display: block;
  margin: auto;
  width: 100%;
  height: 100%;
  object-fit: contain;
  max-height: 650px;
}
.fd-gallery-status {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  max-width: calc(100% - 32px);
  padding: 11px 16px;
  border: 1px solid var(--portal-border, #30343c);
  border-radius: 8px;
  background: #1b1e23ef;
  color: var(--portal-text, #f0f1f3);
  font-size: 12px;
  line-height: 1.6;
  text-align: center;
  pointer-events: none;
}
.fd-gallery-status[hidden], .fd-gallery-dialog [hidden], .fd-gallery [hidden] { display: none; }
.fd-gallery-stage.is-loading .fd-gallery-image,
.fd-gallery-dialog-stage.is-loading .fd-gallery-dialog-image { opacity: .45; }
.fd-gallery-stage.has-error .fd-gallery-image,
.fd-gallery-dialog-stage.has-error .fd-gallery-dialog-image { opacity: .15; }
.fc-detail-page .fd-gallery-thumbs {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 14px 20px;
  border-top: 1px solid var(--fd-line);
  background: var(--fd-panel);
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scrollbar-width: thin;
  scrollbar-color: #555963 transparent;
  scroll-padding: 20px;
}
.fc-detail-page .fd-gallery-thumb {
  flex: none;
  display: block;
  position: relative;
  width: 90px;
  height: 62px;
  padding: 3px;
  border: 1px solid #41454d;
  border-radius: 7px;
  background: #15171b;
  cursor: pointer;
  opacity: .68;
  transition: opacity .16s, border-color .16s;
}
.fc-detail-page .fd-gallery-thumb > span {
  position: absolute;
  right: 6px;
  bottom: 6px;
  min-width: 18px;
  padding: 1px 4px;
  border-radius: 3px;
  color: #f0f1f3;
  background: #111316cc;
  font-size: 10px;
  line-height: 1.4;
  text-align: center;
}
.fc-detail-page .fd-gallery-thumb:hover { opacity: 1; border-color: #7c818b; }
.fc-detail-page .fd-gallery-thumb.is-active,
.fc-detail-page .fd-gallery-thumb[aria-pressed="true"] {
  opacity: 1;
  border-color: var(--fd-accent);
  box-shadow: 0 0 0 1px #f5a53b30;
}
.fc-detail-page .fd-gallery-thumb img {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 3px;
  object-fit: cover;
}
.fd-gallery-dialog {
  --fd-dialog-height: 94vh;
  width: min(1280px, 96vw);
  max-width: 96vw;
  height: var(--fd-dialog-height);
  max-height: var(--fd-dialog-height);
  margin: auto;
  padding: 0;
  border: 1px solid #41454d;
  border-radius: 12px;
  background: var(--portal-panel, #1b1e23);
  color: var(--portal-text, #f0f1f3);
  overflow: hidden;
}
.fd-gallery-dialog::backdrop { background: #080a0de8; backdrop-filter: blur(6px); }
.fd-gallery-dialog-shell { display: flex; flex-direction: column; height: 100%; min-height: 0; }
.fd-gallery-dialog-toolbar { flex: none; }
.fd-gallery-dialog-stage {
  flex: 1;
  position: relative;
  min-height: 0;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: auto;
  background: var(--portal-sidebar, #15171b);
  overscroll-behavior: contain;
}
.fd-gallery-dialog-image {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  margin: auto;
}
.fd-gallery-dialog-stage.is-zoomed { display: block; cursor: grab; touch-action: auto; }
.fd-gallery-dialog-stage.is-zoomed .fd-gallery-dialog-image {
  width: var(--fd-image-width);
  height: var(--fd-image-height);
  max-width: none;
  max-height: none;
  margin: auto;
}
.fd-gallery-dialog-stage.is-panning { cursor: grabbing; user-select: none; }
.fd-gallery-dialog-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  flex: none;
  gap: 10px 16px;
  padding: 12px 20px;
  border-top: 1px solid var(--portal-border, #30343c);
  color: var(--portal-muted, #9298a3);
  font-size: 12px;
}
.fd-gallery-dialog-footer > div { display: flex; align-items: center; gap: 6px; }
.fd-gallery-dialog-footer > .fd-gallery-controls { margin-left: 0; }
.fd-gallery-zoom-reset { min-width: 64px; font-variant-numeric: tabular-nums; }
.fd-gallery-dialog button:focus-visible, .fd-gallery-dialog a:focus-visible {
  outline: 2px solid var(--portal-accent, #f5a53b);
  outline-offset: 3px;
}
@supports (height: 100dvh) { .fd-gallery-dialog { --fd-dialog-height: 94dvh; } }

/* The two download locations share one compact horizontal layout. */
.fc-detail-page .fd-download-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 18px 24px;
  width: 100%;
  margin: 0 0 24px;
  padding: 22px 25px;
  border: 1px solid var(--fd-line);
  border-radius: 11px;
  background: var(--fd-panel);
}
.fc-detail-page .fd-download-copy { flex: 1 1 220px; min-width: 0; }
.fc-detail-page .fd-download-copy h2 {
  margin: 0 0 6px;
  font-size: 20px;
  line-height: 1.35;
  letter-spacing: -.025em;
}
.fc-detail-page .fd-download-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 14px;
  font-size: 12px;
  line-height: 1.6;
  color: var(--fd-muted);
}
.fc-detail-page .fd-download-meta strong { color: #c8cbd1; font-weight: 600; }
.fc-detail-page .fd-download-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 9px; min-width: 0; }
.fc-detail-page .fd-download-actions form { margin: 0; }
.fc-detail-page .fd-download-actions .portal-button { min-height: 44px; font-size: 13px; min-width: 148px; }
.fc-detail-page .fd-download-actions .portal-button.is-secondary { min-width: 0; font-size: 12px; }
.fc-detail-page .fd-download-actions a:not(.portal-button) { color: var(--fd-muted); font-size: 12px; }
.fc-detail-page .fd-download-actions a:not(.portal-button):hover { color: var(--fd-accent); }
.fc-detail-page .fd-download-actions .fd-icon { width: 18px; height: 18px; }
.fc-detail-page .fd-download-strip [role="status"] { flex-basis: 100%; color: var(--fd-muted); font-size: 12px; }

/* Stored article HTML keeps its content, with a consistent neutral frame. */
.fc-detail-page .fc-detail-description { padding: clamp(22px, 2.2vw, 32px); margin-bottom: 24px; }
.fc-detail-page .fc-detail-description > h2 {
  margin: 0 0 23px;
  padding-bottom: 18px;
  border-color: var(--fd-line);
  font-size: 23px;
}
.fc-detail-page .fc-detail-description .fc-rich.prose {
  color: #b8bdc6;
  max-width: none;
  line-height: 1.85;
}
.fc-detail-page .fc-detail-description .fc-rich h2,
.fc-detail-page .fc-detail-description .fc-rich h3,
.fc-detail-page .fc-detail-description .fc-rich h4 { color: var(--fd-text); }
.fc-detail-page .fc-detail-description .fc-rich a { color: var(--fd-accent); }
.fc-detail-page .fc-detail-description .fc-rich li::marker { color: var(--fd-accent); }
.fc-detail-page .fc-detail-description .fc-rich blockquote {
  background: var(--fd-raised);
  border-left-color: var(--fd-accent);
  color: #b8bdc6;
}
.fc-detail-page .pmfc-description-section {
  background: var(--fd-raised);
  border-color: var(--fd-line);
  border-radius: 10px;
  padding: 22px;
  margin: 20px 0;
}
.fc-detail-page .pmfc-description-section > :is(h2,h3,h4) { gap: 0; font-size: 22px; }
.fc-detail-page .pmfc-description-section > :is(h2,h3,h4) > svg,
.fc-detail-page .pmfc-description-icon:not(.xfaq26-chevron),
.fc-detail-page .csart-bhead > .csart-bico,
.fc-detail-page .csart-itbl-head > .csart-itbl-ico { display: none; }
.fc-detail-page .csart-wrap { --art-accent: var(--fd-accent); --art-bg: var(--fd-panel); --art-soft: var(--fd-raised); --art-text: var(--fd-text); --art-muted: var(--fd-muted); --art-line: var(--fd-line); }
.fc-detail-page .csart-desc,
.fc-detail-page .csart-final { background: var(--fd-raised); border-color: var(--fd-line); border-radius: 10px; }
.fc-detail-page .csart-desc::before,
.fc-detail-page .csart-final::before { display: none; }
.fc-detail-page .csart-desc-inner, .fc-detail-page .csart-final-inner { padding: 24px; }
.fc-detail-page .csart-block, .fc-detail-page .csart-itbl-wrap { border-radius: 10px; }
.fc-detail-page .csart-bhead, .fc-detail-page .csart-itbl-head { padding: 17px 20px; gap: 0; }
.fc-detail-page .csart-wrap .csart-bttl, .fc-detail-page .csart-wrap .csart-itbl-ttl {
  font-size: 18px;
  text-transform: none;
  letter-spacing: -.02em;
}
.fc-detail-page .pmfc-description-nav { background: var(--fd-raised); border-color: var(--fd-line); border-radius: 10px; }
.fc-detail-page .pmfc-description-nav a { background: var(--fd-panel); border-color: var(--fd-line); border-radius: 6px; }
.fc-detail-page .fc-rich.prose .pmfc-description-table {
  display: block;
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  border: 1px solid var(--fd-line);
  border-radius: 9px;
  background: var(--fd-panel);
}
.fc-detail-page .fc-rich.prose table {
  display: table;
  width: 100%;
  max-width: 100%;
  table-layout: fixed;
  border-collapse: collapse;
  border-spacing: 0;
  border: 1px solid var(--fd-line);
  margin: 18px 0;
  overflow: visible;
  white-space: normal;
  font-size: 13px;
}
.fc-detail-page .fc-rich.prose :is(.pmfc-description-table,.csart-itbl-wrap) table { border: 0; margin: 0; }
.fc-detail-page .fc-rich.prose table :is(td,th) {
  border: 0;
  border-bottom: 1px solid var(--fd-line);
  background: transparent;
  padding: 13px 16px;
  overflow-wrap: anywhere;
  vertical-align: top;
  text-align: left;
  line-height: 1.65;
  font-size: 13px;
}
.fc-detail-page .fc-rich.prose table th { color: var(--fd-text); background: var(--fd-raised); font-weight: 600; }
.fc-detail-page .fc-rich.prose table tr:last-child :is(td,th) { border-bottom: 0; }
.fc-detail-page .fc-rich.prose .pmfc-description-table th { width: 32%; }
.fc-detail-page .fc-rich.prose .csart-itbl :is(td:first-child,th) { width: 32%; text-transform: none; letter-spacing: 0; color: var(--fd-muted); }
.fc-detail-page .fd-file-specs {
  margin: 25px 0 0;
  padding-top: 20px;
  border-top: 1px solid var(--fd-line);
}
.fc-detail-page .fd-file-specs > summary {
  cursor: pointer;
  color: #c5c8ce;
  font-size: 13px;
  font-weight: 600;
  padding: 4px 0;
}
.fc-detail-page .fd-file-specs > summary::marker { color: var(--fd-accent); }
.fc-detail-page .fd-spec-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0,1fr));
  gap: 18px 30px;
  margin: 20px 0 0;
}
.fc-detail-page .fd-spec-grid > div { min-width: 0; }
.fc-detail-page .fd-spec-grid dt { color: var(--fd-muted); font-size: 11px; margin-bottom: 5px; }
.fc-detail-page .fd-spec-grid dd { color: #c6c9d0; font-size: 13px; margin: 0; overflow-wrap: anywhere; }
.fc-detail-page .fc-share { margin: 24px 0; border-color: var(--fd-line); }
.fc-detail-page .fc-share input { color: #b1b6c0 !important; }
.fc-detail-page .fc-single-cover { background: var(--portal-sidebar, #15171b); margin-bottom: 18px; border-color: var(--fd-line); }
.fc-detail-page .fc-tags a { background: var(--fd-raised); border-color: var(--fd-line); color: var(--fd-muted); }
.fc-detail-page .fc-tags a:hover { border-color: #765631; color: var(--fd-accent); }
.fc-detail-page .fc-author-links { font-size: 12px; color: var(--fd-accent); }
.fc-detail-page .fc-author-links > span { font-size: 12px; color: var(--fd-muted); }

/* Comments fill the same content column and keep all existing actions. */
.fc-detail-page .fd-comments-panel { width: 100%; padding: 26px; margin-top: 24px; overflow: visible; }
.fc-detail-page .fd-comments-panel .pb-comments {
  max-width: none;
  width: 100%;
  margin: 0;
  padding: 0;
  border-top: 0;
  color: var(--fd-text);
  font-family: inherit;
}
.fc-detail-page .pb-comments .cm-thread-heading { padding-bottom: 19px; margin-bottom: 20px; border-bottom: 1px solid var(--fd-line); }
.fc-detail-page .pb-comments .cm-thread-heading h2 { font: 700 23px/1.3 var(--font); letter-spacing: -.025em; }
.fc-detail-page .pb-comments .cm-count {
  padding: 3px 8px;
  margin-left: 6px;
  border: 1px solid #f5a53b40;
  border-radius: 6px;
  background: #f5a53b0d;
  color: var(--fd-accent);
  font: 600 12px/1.5 var(--font);
}
.fc-detail-page .pb-comments .cm-sort select {
  background: var(--fd-raised);
  color: var(--fd-muted);
  border: 1px solid var(--fd-line);
  border-radius: 7px;
  font-family: inherit;
}
.fc-detail-page .pb-comments .cm-sort select:hover { color: var(--fd-text); border-color: #5b6069; }
.fc-detail-page .pb-comments .cm-item { padding-bottom: 17px; }
.fc-detail-page .pb-comments .cm-item + .cm-item { padding-top: 14px; border-top: 1px solid #30343c80; }
.fc-detail-page .pb-comments .cm-item + .cm-item .cm-avatar { top: 14px; }
.fc-detail-page .pb-comments .cm-avatar { background: var(--fd-raised); color: var(--fd-accent); font-family: inherit; border: 1px solid var(--fd-line); }
.fc-detail-page .pb-comments .cm-author { color: #d2d5db; }
.fc-detail-page .pb-comments .cm-author a:hover { color: var(--fd-accent); }
.fc-detail-page .pb-comments :is(.cm-date,.cm-own,.cm-parent,.cm-readonly,.cm-editor-note,.cm-edit-footer p,.cm-compose-footer p,.pc-help) { color: var(--fd-muted); }
.fc-detail-page .pb-comments :is(.cm-parent a,.cm-text-button,.cm-edit > summary,.text-link) { color: var(--fd-accent); font-family: inherit; }
.fc-detail-page .pb-comments .cm-body { color: #bfc3cb; }
.fc-detail-page .pb-comments .cm-body blockquote { background: var(--fd-raised); border-left-color: var(--fd-accent); }
.fc-detail-page .pb-comments .cm-icon-button { color: var(--fd-muted); border-radius: 7px; }
.fc-detail-page .pb-comments .cm-icon-button:hover,
.fc-detail-page .pb-comments .cm-icon-button[aria-expanded="true"] { background: var(--fd-raised); color: var(--fd-accent); }
.fc-detail-page .pb-comments .cm-engagement :is(.product-like,.product-stat,.like-statistics-button) { color: var(--fd-muted); font-family: inherit; }
.fc-detail-page .pb-comments .cm-engagement :is(.product-like,.like-statistics-button):hover,
.fc-detail-page .pb-comments .cm-engagement .product-like[aria-pressed="true"] { color: var(--fd-accent); background: #f5a53b0d; }
.fc-detail-page .pb-comments :is(.cm-empty,.cm-login,.cm-compose) {
  background: var(--fd-raised);
  border: 1px solid var(--fd-line);
  border-radius: 9px;
}
.fc-detail-page .pb-comments .cm-empty { padding: 24px; justify-content: flex-start; }
.fc-detail-page .pb-comments .cm-empty > span { color: var(--fd-accent); font-family: inherit; }
.fc-detail-page .pb-comments :is(.cm-empty h3,.cm-login h3,.cm-compose-heading h3) { font-family: inherit; color: var(--fd-text); font-weight: 650; }
.fc-detail-page .pb-comments :is(.cm-empty p,.cm-login p,.cm-compose-heading p) { color: var(--fd-muted); }
.fc-detail-page .pb-comments .cm-compose { padding: 18px; margin-top: 20px; }
.fc-detail-page .pb-comments .cm-edit > form { border-top-color: var(--fd-line); }
.fc-detail-page .pb-comments .cm-reply-hint { color: var(--fd-muted); }
.fc-detail-page .pb-comments .pc-field,
.fc-detail-page .pb-comments .pc-rich-heading > label { color: var(--fd-muted); font-weight: 600; }
.fc-detail-page .pb-comments .pc-field > select,
.fc-detail-page .pb-comments .pc-rich > textarea {
  background: var(--fd-panel);
  border-color: var(--fd-line);
  color: var(--fd-text);
  font-family: inherit;
  border-radius: 7px;
}
.fc-detail-page .pb-comments .pc-visual-wrap { background: var(--fd-panel); border-color: var(--fd-line); border-radius: 8px; }
.fc-detail-page .pb-comments .pc-visual-input { color: #c8ccd3; }
.fc-detail-page .pb-comments .pc-visual-input:focus { box-shadow: inset 0 0 0 1px var(--fd-accent); border-radius: 8px; }
.fc-detail-page .pb-comments .cm-rich-compact .pc-visual-input:empty::before { color: #777e8a; }
.fc-detail-page .pb-comments .pc-rich-toolbar { background: var(--fd-raised); border-color: var(--fd-line); }
.fc-detail-page .pb-comments .pc-rich-toolbar button,
.fc-detail-page .pb-comments .pc-editor-switch button { background: var(--fd-panel); border-color: var(--fd-line); color: #c0c5ce; font-family: inherit; }
.fc-detail-page .pb-comments .pc-rich-toolbar button:hover,
.fc-detail-page .pb-comments .pc-editor-switch button[aria-pressed="true"] { color: var(--fd-accent); border-color: #765631; }
.fc-detail-page .pb-comments .pc-editor-switch { background: var(--fd-raised); }
.fc-detail-page .pb-comments .cm-send-button { border-radius: 8px; background: var(--fd-accent); color: #171717; box-shadow: none; }
.fc-detail-page .pb-comments .cm-send-button:hover { background: var(--portal-accent-hover, #ffb954); }
.fc-detail-page .pb-comments .cm-delete form { background: var(--fd-raised); border-color: var(--fd-line); box-shadow: 0 10px 30px #0004; }
.fc-detail-page .pb-comments .cm-delete form p { color: #bfc3cb; }
.fc-detail-page .pb-comments .cm-delete-button { background: #372526; border-color: #6b3f40; color: #e3a9a6; font-family: inherit; }
.fc-detail-page .pb-comments .cm-status-pending { background: #342b20; color: #d9b57d; }
.fc-detail-page .pb-comments .cm-status-rejected { background: #342323; color: #dfa19c; }
.fc-detail-page .pb-comments .cm-status-approved { background: #203028; color: #91bd9f; }
.fc-detail-page .pb-comments .social-picker { color: var(--fd-text); }
.fc-detail-page .pb-comments .social-picker summary,
.fc-detail-page .pb-comments .social-picker-more,
.fc-detail-page .pb-comments .social-carousel-arrow { background: var(--fd-panel); color: var(--fd-muted); border-color: var(--fd-line); border-radius: 8px; }
.fc-detail-page .pb-comments .social-picker summary:hover,
.fc-detail-page .pb-comments .social-picker details[open] > summary,
.fc-detail-page .pb-comments .social-carousel-arrow:hover:not(:disabled) { background: #30343c; color: var(--fd-accent); border-color: #765631; }
.fc-detail-page .pb-comments .social-picker-panel { background: var(--fd-panel); color: var(--fd-text); border-color: #474c55; border-radius: 11px; box-shadow: 0 12px 34px #0005; }
.fc-detail-page .pb-comments .social-picker :is(input[type="search"],select) { background: var(--fd-raised); color: var(--fd-text); border-color: var(--fd-line); }
.fc-detail-page .pb-comments :is(.social-pack-button,.social-emoji-category) { background: var(--fd-raised); color: #bfc3cb; border-radius: 8px; }
.fc-detail-page .pb-comments :is(.social-pack-button,.social-emoji-category,.social-sticker-grid button)[aria-pressed="true"] { background: #f5a53b0d; color: var(--fd-accent); border-color: var(--fd-accent); box-shadow: none; }
.fc-detail-page .pb-comments :is(.social-pack-button,.social-emoji-grid button,.social-sticker-grid button):hover { background: #30343c; }
.fc-detail-page .pb-comments :is(.social-pack-status,.social-picker-section-heading > span:last-child,[data-emoji-status]) { color: var(--fd-muted); }
.fc-detail-page .pb-comments .social-sticker-preview button { background: var(--fd-raised); color: var(--fd-text); border-color: var(--fd-line); }
.fc-detail-page .pb-comments .social-carousel-track { scrollbar-color: #555963 transparent; }
.fc-detail-page :focus-visible,
.fc-detail-page .pb-comments :focus-visible { outline: 2px solid var(--fd-accent); outline-offset: 3px; }

@container file-detail (max-width: 700px) {
  .fc-detail-page .fd-download-actions { width: 100%; }
  .fc-detail-page .fd-download-actions .portal-button { flex: 1; }
  .fc-detail-page .fd-download-actions form { flex: 1; }
  .fc-detail-page .fd-download-actions form .portal-button { width: 100%; }
  .fc-detail-page .fd-gallery-toolbar { padding: 13px 16px; }
  .fc-detail-page .fd-gallery-thumbs { padding: 12px 16px; }
  .fc-detail-page .fd-comments-panel { padding: 22px; }
  .fc-detail-page .pmfc-description-section { padding: 18px; }
  .fc-detail-page .csart-desc-inner, .fc-detail-page .csart-final-inner { padding: 20px; }
}
@media (max-width: 720px) {
  .fc-detail-page .fc-detail-heading.portal-panel { padding: 19px !important; }
  .fc-detail-page .fc-detail-heading h1 { font-size: 25px; }
  .fc-detail-page .fc-detail-description { padding: 22px; }
  .fc-detail-page .fd-download-strip { padding: 20px 22px; }
  .fc-detail-page .fd-comments-panel { padding: 22px; }
  .fd-gallery-dialog { border-radius: 9px; width: 96vw; }
  .fd-gallery-dialog-toolbar, .fd-gallery-dialog-footer { padding: 11px 12px; gap: 8px; }
  .fd-gallery-dialog-title { font-size: 14px; }
}
@media (max-width: 500px) {
  .fc-detail-page .fc-detail-heading.portal-panel { padding: 18px !important; }
  .fc-detail-page .fc-detail-heading h1 { font-size: 23px; line-height: 1.35; }
  .fc-detail-page .fc-detail-byline { font-size: 11px; gap: 8px 14px; }
  .fc-detail-page .fc-detail-summary { font-size: 13px; }
  .fc-detail-page .fc-detail-feedback { gap: 10px 14px; font-size: 11px; }
  .fc-detail-page .fd-gallery-title { font-size: 15px; }
  .fd-gallery-controls { gap: 5px; }
  .fd-gallery-controls button { min-width: 44px; min-height: 44px; padding: 8px; }
  .fc-detail-page .fd-gallery-thumb { width: 74px; height: 53px; }
  .fc-detail-page .fd-download-strip { padding: 18px; gap: 14px; }
  .fc-detail-page .fd-download-copy h2 { font-size: 18px; }
  .fc-detail-page .fc-detail-description { padding: 18px; }
  .fc-detail-page .fc-detail-description > h2 { font-size: 21px; }
  .fc-detail-page .pmfc-description-section { padding: 16px; }
  .fc-detail-page .pmfc-description-section > :is(h2,h3,h4) { font-size: 19px; }
  .fc-detail-page .fc-rich.prose table :is(td,th) { padding: 10px; font-size: 12px; }
  .fc-detail-page .fd-spec-grid { grid-template-columns: 1fr; gap: 15px; }
  .fc-detail-page .fd-comments-panel { padding: 18px; }
  .fc-detail-page .pb-comments .cm-thread-heading h2 { font-size: 21px; }
  .fc-detail-page .pb-comments .cm-empty { padding: 18px; gap: 14px; }
  .fc-detail-page .pb-comments .cm-compose { padding: 12px; }
  .fc-detail-page .pb-comments .pc-rich > textarea,
  .fc-detail-page .pb-comments .pc-visual-input { font-size: 16px; }
  .fd-gallery-dialog-footer { justify-content: center; }
  .fd-gallery-dialog-footer > div { justify-content: center; }
}
@media (prefers-reduced-motion: reduce) {
  .fd-gallery-controls button,
  .fd-gallery-dialog-controls button,
  .fd-gallery-dialog-footer button,
  .fd-gallery-dialog-footer a,
  .fc-detail-page .fd-gallery-thumb { transition: none; }
}

/* File facts and imported FAQ blocks share the portal's compact rhythm. */
.fc-detail-page .fd-file-specs{width:100%;padding:24px;margin:0 0 24px;border:1px solid var(--fd-line);border-radius:11px;background:var(--fd-panel)}
.fc-detail-page .fd-file-specs>h2{font-size:20px;line-height:1.4;margin:0 0 17px;letter-spacing:-.025em}
.fc-detail-page .fd-spec-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin:0}
.fc-detail-page .fd-spec-grid>div{padding:14px 16px;min-height:77px;border:1px solid var(--fd-line);border-radius:8px;background:var(--fd-raised)}
.fc-detail-page .fd-spec-grid dt{font-size:11px;line-height:1.5;margin:0 0 7px;color:var(--fd-muted)}
.fc-detail-page .fd-spec-grid dd{font-size:14px;line-height:1.6;font-weight:600;color:var(--fd-text)}
.fc-detail-page .fd-file-specs .fc-author-links{margin-top:17px;padding-top:15px;border-top:1px solid var(--fd-line)}
.fc-detail-page .fc-rich .fd-faq{margin:25px 0;min-width:0}
.fc-detail-page .fc-rich .fd-faq>h2{font-size:24px;line-height:1.35;margin:0 0 7px;color:var(--fd-text)}
.fc-detail-page .fc-rich .fd-faq-intro{color:var(--fd-muted);font-size:13px;line-height:1.7;margin:0 0 17px}
.fc-detail-page .fc-rich .fd-faq-item{border:1px solid var(--fd-line);border-radius:9px;background:var(--fd-raised);margin:10px 0;overflow:hidden}
.fc-detail-page .fc-rich .fd-faq-item>summary{display:flex;align-items:center;justify-content:space-between;gap:18px;list-style:none;cursor:pointer;padding:17px 19px;font-size:15px;font-weight:600;line-height:1.6;color:var(--fd-text)}
.fc-detail-page .fc-rich .fd-faq-item>summary::-webkit-details-marker{display:none}
.fc-detail-page .fc-rich .fd-faq-item>summary::after{content:'+';display:grid;place-items:center;flex:none;width:25px;height:25px;border:1px solid #444a54;border-radius:6px;color:var(--fd-accent);font-size:18px;font-weight:400;line-height:1;background:var(--fd-panel)}
.fc-detail-page .fc-rich .fd-faq-item[open]>summary::after{content:'−'}
.fc-detail-page .fc-rich .fd-faq-item>summary:hover{background:#ffffff04}
.fc-detail-page .fc-rich .fd-faq-item[open]>summary{border-bottom:1px solid var(--fd-line)}
.fc-detail-page .fc-rich .fd-faq-answer{padding:18px 20px;background:var(--fd-panel);color:#b8bdc6;line-height:1.8;font-size:14px;overflow-wrap:anywhere}
.fc-detail-page .fc-rich .fd-faq-answer>:first-child{margin-top:0}
.fc-detail-page .fc-rich .fd-faq-answer>:last-child{margin-bottom:0}
.fc-detail-page .fc-rich .fd-faq-answer strong{color:var(--fd-text)}
.fc-detail-page .fc-share{padding:22px;gap:16px}
.fc-detail-page .fc-share>h2{font-size:19px;line-height:1.4}
@container file-detail (max-width:760px){
 .fc-detail-page .fd-spec-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@container file-detail (max-width:560px){
 .fc-detail-page .fd-file-specs{padding:19px}
 .fc-detail-page .fd-spec-grid>div{padding:12px;min-height:72px}
 .fc-detail-page .fc-rich .fd-faq-item>summary{font-size:14px;padding:14px;gap:12px}
 .fc-detail-page .fc-rich .fd-faq-answer{padding:15px;font-size:13px}
}
@media(max-width:420px){.fc-detail-page .fd-spec-grid{grid-template-columns:1fr}}

/* Compact heading, one-column filmstrip and a broad download action. */
.fc-detail-page .fc-breadcrumbs { margin: 0 0 17px; font-size: 10px; line-height: 1.7; gap: 5px 10px; }
.fc-detail-page .fc-breadcrumbs > span:last-child { color: #c1c6cf; }
.fc-detail-page .fd-byline-chip { display: inline-flex; align-items: center; gap: 7px; min-height: 36px; padding: 6px 10px; border: 1px solid var(--fd-line); border-radius: 7px; background: var(--fd-raised); font-size: 11px; line-height: 1.5; }
.fc-detail-page .fd-byline-chip .fd-icon { width: 15px; height: 15px; color: var(--fd-accent); }
.fc-detail-page .fc-detail-byline time::before { content: none; }
.fc-detail-page .fd-byline-edit { margin-left: auto; padding: 7px 0; font-size: 11px; }
.fc-detail-page .fc-detail-feedback .like-controls { min-height: 36px; border: 1px solid var(--fd-line); border-radius: 7px; background: var(--fd-raised); gap: 0; padding-right: 5px; }
.fc-detail-page .fc-detail-feedback .like-controls > .product-like,
.fc-detail-page .fc-detail-feedback .like-controls > .product-stat { width: 34px; min-width: 34px; min-height: 34px; border: 0; background: transparent; border-radius: 6px; }
.fc-detail-page .fc-detail-feedback .like-statistics-button { min-height: 34px; padding: 5px; font-size: 11px; font-family: inherit; }
.fc-detail-page .fc-detail-feedback .like-statistics-button:hover { background: #f5a53b0c; color: var(--fd-accent); }
.fc-detail-page .fd-introduction { padding: 19px 22px; margin-bottom: 22px; }
.fc-detail-page .fd-introduction h2 { margin: 0 0 9px; color: var(--fd-muted); font-size: 12px; font-weight: 600; }
.fc-detail-page .fd-introduction .fc-detail-summary { margin: 0; font-size: 13px; line-height: 1.8; }
.fc-detail-page .fd-introduction .fc-detail-summary > :first-child { margin-top: 0; }
.fc-detail-page .fd-introduction .fc-detail-summary > :last-child { margin-bottom: 0; }
.fc-detail-page .fd-gallery { --fd-gallery-height: clamp(250px, 34cqw, 340px); padding: 12px; margin-bottom: 14px; }
.fc-detail-page .fd-gallery-content { display: grid; grid-template-columns: minmax(0, 1fr) 144px; align-items: stretch; gap: 12px; min-width: 0; }
.fc-detail-page .fd-gallery-viewport { position: relative; min-width: 0; height: var(--fd-gallery-height); overflow: hidden; border: 1px solid var(--fd-line); border-radius: 8px; background: var(--portal-sidebar, #15171b); }
.fc-detail-page .fd-gallery-stage { height: 100%; min-height: 0; max-height: none; aspect-ratio: auto; padding: 0; background: transparent; }
.fc-detail-page .fd-gallery-stage .fd-gallery-image { width: 100%; height: 100%; max-height: none; object-fit: contain; aspect-ratio: auto; }
.fc-detail-page .fd-gallery-stage-hint { right: 10px; bottom: 11px; padding: 6px 9px; background: #15171be8; border-color: #444a55; font-size: 10px; }
.fc-detail-page .fd-gallery-stage-controls { position: absolute; left: 9px; bottom: 9px; gap: 5px; margin: 0; padding: 3px; border: 1px solid #444a5570; border-radius: 8px; background: #15171be8; }
.fc-detail-page .fd-gallery-stage-controls button { min-height: 38px; min-width: 38px; padding: 8px; border-color: transparent; background: transparent; }
.fc-detail-page .fd-gallery-stage-controls button:hover:not(:disabled) { background: #f5a53b14; border-color: #f5a53b50; }
.fc-detail-page .fd-gallery-rail { display: flex; flex-direction: column; min-width: 0; height: var(--fd-gallery-height); border: 1px solid var(--fd-line); border-radius: 8px; background: var(--fd-raised); overflow: hidden; }
.fc-detail-page .fd-gallery-toolbar { flex: none; flex-wrap: nowrap; gap: 8px; padding: 10px 9px; background: transparent; border-color: var(--fd-line); }
.fc-detail-page .fd-gallery-title { color: var(--fd-accent); font-size: 9px; font-weight: 700; line-height: 1.5; letter-spacing: .09em; text-transform: uppercase; }
.fc-detail-page .fd-gallery-toolbar .fd-gallery-count { padding: 2px 5px; border: 1px solid var(--fd-line); border-radius: 5px; background: var(--fd-panel); color: #c7cbd3; font-size: 10px; }
.fc-detail-page .fd-gallery-thumbs { display: grid; grid-template-columns: minmax(0, 1fr); align-content: start; align-items: start; flex: 1; min-height: 0; height: auto; max-height: none; gap: 8px; padding: 9px; overflow-y: auto; overflow-x: hidden; border: 0; background: transparent; scrollbar-color: #ad762c transparent; scroll-padding: 9px; }
.fc-detail-page .fd-gallery-thumb { width: 100%; min-height: 0; height: auto; aspect-ratio: 16 / 10; padding: 2px; border-radius: 6px; background: var(--fd-panel); opacity: .72; }
.fc-detail-page .fd-gallery-thumb.is-active { border-color: var(--fd-accent); box-shadow: 0 0 0 1px #f5a53b33; }
.fc-detail-page .fd-gallery-thumb > span { right: 5px; bottom: 5px; }
.fc-detail-page .fd-download-strip { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; padding: 16px; margin-bottom: 22px; background: linear-gradient(100deg, #f5a53b08, transparent 65%), var(--fd-panel); }
.fc-detail-page .fd-download-strip[data-fd-download-location="gallery"] { grid-template-columns: minmax(0, 1fr) auto; }
.fc-detail-page .fd-download-main { display: flex; flex-direction: column; min-width: 0; gap: 10px; }
.fc-detail-page .fd-download-copy { flex: none; }
.fc-detail-page .fd-download-copy h2 { font-size: 17px; margin-bottom: 5px; }
.fc-detail-page .fd-download-meta { gap: 5px 12px; font-size: 11px; line-height: 1.6; }
.fc-detail-page .fd-download-actions { width: 100%; gap: 8px; align-items: stretch; }
.fc-detail-page .fd-download-primary { flex: 1 1 220px; }
.fc-detail-page .fd-download-mirror { flex: 0 1 auto; }
.fc-detail-page .fd-download-actions form .portal-button { width: 100%; min-height: 47px; min-width: 0; padding-inline: 14px; }
.fc-detail-page .fd-download-actions .portal-button.is-secondary { min-height: 47px; }
.fc-detail-page .fd-download-strip[data-fd-download-location="gallery"].is-ready .fd-download-copy { order: 2; }
.fc-detail-page .fd-download-strip[data-fd-download-location="gallery"].is-ready .fd-download-copy h2 { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.fc-detail-page .fd-download-strip[data-fd-download-location="gallery"] .fd-download-primary { flex-basis: 100%; }
.fc-detail-page .fd-download-stats { display: flex; align-items: stretch; flex-wrap: wrap; gap: 8px; margin: 0; }
.fc-detail-page .fd-download-stat { display: grid; grid-template-columns: 28px minmax(0, 1fr); align-content: center; gap: 3px 8px; min-width: 112px; padding: 11px; border: 1px solid var(--fd-line); border-radius: 8px; background: var(--fd-raised); }
.fc-detail-page .fd-stat-icon { display: grid; place-items: center; grid-row: 1 / span 2; width: 28px; height: 28px; border: 1px solid #f5a53b35; border-radius: 7px; background: #f5a53b0b; color: var(--fd-accent); }
.fc-detail-page .fd-stat-icon .fd-icon { width: 16px; height: 16px; }
.fc-detail-page .fd-download-stat dt { font-size: 9px; line-height: 1.3; letter-spacing: .03em; color: var(--fd-muted); }
.fc-detail-page .fd-download-stat dd { margin: 0; color: var(--fd-text); font-size: 14px; font-weight: 700; line-height: 1.3; font-variant-numeric: tabular-nums; }
.fc-detail-page .fc-detail-description .fc-rich.prose { font-size: 14px; line-height: 1.85; }
.fc-detail-page .fc-rich.prose :is(h2,h3,h4) { text-wrap: pretty; line-height: 1.45; letter-spacing: -.015em; }
.fc-detail-page .fc-rich.prose h3.fd-table-title { display: block; margin: 24px 0 15px; padding-left: 12px; border-left: 3px solid var(--fd-accent); font-size: 20px; font-weight: 700; }
.fc-detail-page .fc-rich.prose .fd-table-kicker { display: block; margin-bottom: 5px; color: var(--fd-accent); font-size: 10px; font-weight: 600; line-height: 1.5; letter-spacing: .07em; text-transform: uppercase; }
.fc-detail-page .fc-rich.prose .fd-table-label { display: block; color: var(--fd-text); font-size: 20px; line-height: 1.45; }
.fc-detail-page .fc-rich.prose strong { color: #dde0e5; }
.fc-detail-page .fc-rich.prose :is(ul,ol) { padding-left: 23px; }
.fc-detail-page .fc-rich.prose li { margin-block: 9px; }
@container file-detail (max-width: 760px) {
  .fc-detail-page .fd-gallery-content { grid-template-columns: minmax(0, 1fr) 124px; gap: 10px; }
  .fc-detail-page .fd-gallery-toolbar { padding-inline: 7px; gap: 4px; }
  .fc-detail-page .fd-gallery-thumbs { padding: 7px; }
  .fc-detail-page .fd-download-stat { min-width: 104px; padding: 9px; gap: 3px 6px; }
  .fc-detail-page .fd-download-strip { padding: 14px; gap: 12px; }
}
@container file-detail (max-width: 600px) {
  .fc-detail-page .fd-download-strip[data-fd-download-location="gallery"] { grid-template-columns: minmax(0, 1fr); }
  .fc-detail-page .fd-download-stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .fc-detail-page .fd-download-stat { min-height: 58px; }
}
@container file-detail (max-width: 560px) {
  .fc-detail-page .fd-gallery { padding: 9px; }
  .fc-detail-page .fd-gallery-content { display: block; }
  .fc-detail-page .fd-gallery-viewport { height: clamp(210px, 58cqw, 270px); }
  .fc-detail-page .fd-gallery-rail { margin-top: 9px; height: auto; }
  .fc-detail-page .fd-gallery-toolbar { padding: 8px 10px; }
  .fc-detail-page .fd-gallery-title { font-size: 10px; }
  .fc-detail-page .fd-gallery-thumbs { display: flex; flex: none; height: auto; max-height: 84px; padding: 9px; gap: 8px; overflow-x: auto; overflow-y: hidden; }
  .fc-detail-page .fd-gallery-thumb { flex: 0 0 84px; width: 84px; height: 56px; }
  .fc-detail-page .fd-gallery-stage-hint { top: 9px; bottom: auto; font-size: 9px; }
  .fc-detail-page .fd-download-primary { flex-basis: 100%; }
  .fc-detail-page .fd-download-mirror { flex: 1 1 auto; }
  .fc-detail-page .fd-byline-edit { margin-left: 0; }
  .fc-detail-page .fd-introduction { padding: 17px; }
  .fc-detail-page .fc-rich.prose h3.fd-table-title,
  .fc-detail-page .fc-rich.prose .fd-table-label { font-size: 18px; }
}

/* Keep each preview row at its image height instead of shrinking all rows. */
.fc-detail-page .fd-gallery-thumbs { grid-auto-rows: minmax(72px, max-content); }
@container file-detail (max-width: 760px) {
  .fc-detail-page .fd-gallery-thumbs { grid-auto-rows: minmax(60px, max-content); }
}
