/* ══════════════════════════════════════════════
   HOYAN — Download center (one table: documents, firmware, software)
   Loaded by the download-center pages only
══════════════════════════════════════════════ */
:root {
  --dc-warn-fg: #fbbf24; --dc-warn-bg: rgba(251,191,36,.10); --dc-warn-bd: rgba(251,191,36,.45);
  --dc-row-hover: rgba(255,255,255,.025);
}
html[data-theme="light"] {
  --dc-warn-fg: #92400e; --dc-warn-bg: #fffbeb; --dc-warn-bd: #f59e0b;
  --dc-row-hover: rgba(10,31,60,.03);
}

/* compact page header: title and one line, no hero artwork */
.dc-head { padding: calc(var(--nav-height) + 36px) 5% 26px; background: var(--bg-primary); border-bottom: 1px solid var(--border); }
.dc-head h1 { font-size: clamp(1.7rem, 3vw, 2.2rem); margin: 10px 0 6px; }
.dc-head p { color: var(--text-secondary); font-size: .92rem; }

.dc-poc {
  display: flex; gap: 10px; align-items: flex-start; margin-bottom: 18px;
  background: var(--dc-warn-bg); border: 1px solid var(--dc-warn-bd); color: var(--dc-warn-fg);
  border-radius: 8px; padding: 10px 14px; font-size: .85rem;
}
.dc-poc i { margin-top: 3px; }

/* filter bar */
.dc-bar { display: flex; gap: 10px; flex-wrap: wrap; }
.dc-search {
  flex: 1 1 320px; display: flex; align-items: center; gap: 10px; height: 44px; padding: 0 14px;
  background: var(--bg-card); border: 1px solid var(--border); border-radius: 8px;
}
.dc-search:focus-within { border-color: var(--accent); }
.dc-search i { color: var(--text-muted); }
.dc-search input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; color: var(--text-primary); font: inherit; font-size: .92rem; }
.dc-search input::placeholder { color: var(--text-secondary); opacity: 1; }
.dc-bar select {
  height: 44px; padding: 0 34px 0 12px; border-radius: 8px; font: inherit; font-size: .88rem;
  background: var(--bg-card); color: var(--text-primary); border: 1px solid var(--border); cursor: pointer;
  appearance: none; -webkit-appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--text-muted) 50%), linear-gradient(135deg, var(--text-muted) 50%, transparent 50%);
  background-position: calc(100% - 17px) 19px, calc(100% - 12px) 19px; background-size: 5px 5px; background-repeat: no-repeat;
}
.dc-bar select:focus { outline: 0; border-color: var(--accent); }
.dc-bar select option, .dc-bar select optgroup { background: var(--bg-card); color: var(--text-primary); }

/* type tabs: underline style */
.dc-tabs { display: flex; gap: 2px; margin-top: 18px; border-bottom: 1px solid var(--border); overflow-x: auto; scrollbar-width: none; }
.dc-tabs::-webkit-scrollbar { display: none; }
.dc-tab {
  background: none; border: 0; border-bottom: 2px solid transparent; margin-bottom: -1px;
  padding: 10px 14px; font: inherit; font-size: .88rem; color: var(--text-secondary); cursor: pointer; white-space: nowrap;
}
.dc-tab span { font-size: .75rem; color: var(--text-muted); margin-left: 2px; }
.dc-tab:hover { color: var(--text-primary); }
.dc-tab.active { color: var(--accent); border-bottom-color: var(--accent); font-weight: 600; }
.dc-tab.active span { color: var(--accent); }

.dc-prod { margin-top: 16px; font-size: .92rem; }
.dc-prod a { color: var(--accent); text-decoration: none; font-size: .82rem; margin-left: 10px; }
.dc-prod a:hover { text-decoration: underline; }

.dc-meta { display: flex; justify-content: space-between; align-items: center; margin: 14px 0 6px; font-size: .8rem; color: var(--text-muted); }
.dc-clear { background: none; border: 0; color: var(--accent); font: inherit; font-size: .8rem; cursor: pointer; }
.dc-clear:hover { text-decoration: underline; }

/* table */
.dc-table { width: 100%; border-collapse: collapse; font-size: .88rem; }
.dc-table th {
  text-align: left; font-weight: 600; font-size: .75rem; letter-spacing: .4px; color: var(--text-muted);
  padding: 10px 12px; border-bottom: 1px solid var(--border-solid);
}
.dc-table td { padding: 14px 12px; border-bottom: 1px solid var(--border); vertical-align: top; color: var(--text-secondary); }
.dc-row:hover td { background: var(--dc-row-hover); }
.dc-row.open td { border-bottom-color: transparent; }
.dc-title { color: var(--text-primary); font-weight: 600; line-height: 1.45; }
.dc-muted { color: var(--text-muted); font-size: .78rem; margin-top: 3px; }
.dc-type, .dc-ver { white-space: nowrap; }
.dc-ver .dc-muted { font-family: inherit; }
.dc-ver { font-family: Inter, sans-serif; }
.dc-dash { color: var(--text-muted); }
.dc-name { width: 44%; }
.dc-files { width: 30%; }

.dc-file {
  display: inline-flex; align-items: baseline; gap: 6px; margin: 0 14px 4px 0;
  color: var(--accent); text-decoration: none; font-weight: 600; white-space: nowrap;
}
.dc-file i { font-size: .78rem; }
.dc-file small { color: var(--text-muted); font-weight: 400; font-size: .75rem; }
.dc-file:hover span { text-decoration: underline; }

.dc-more {
  display: inline-flex; align-items: center; gap: 5px; background: none; border: 0; padding: 0;
  color: var(--text-secondary); font: inherit; font-size: .8rem; cursor: pointer;
}
.dc-more i { font-size: .65rem; transition: transform .2s; }
.dc-row.open .dc-more i { transform: rotate(180deg); }
.dc-more:hover { color: var(--accent); }

/* expanded version list */
.dc-detail td { padding: 0 12px 16px; background: var(--dc-row-hover); }
.dc-rels { list-style: none; margin: 0; padding: 4px 0 0; }
.dc-rels > li { padding: 10px 0; border-top: 1px dashed var(--border); }
.dc-rels > li:first-child { border-top: 0; }
.dc-rel-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; color: var(--text-primary); }
.dc-rel-head .dc-muted { margin: 0; }
.dc-rel-head .dc-file { margin: 0 0 0 auto; }
.dc-tag { font-size: .68rem; font-weight: 600; padding: 1px 7px; border-radius: 4px; border: 1px solid; }
.dc-tag.ok { color: var(--ok); }
.dc-tag.warn { color: var(--dc-warn-fg); background: var(--dc-warn-bg); border-color: transparent; }
.dc-notes { margin: 6px 0 0 18px; padding: 0; font-size: .8rem; line-height: 1.6; }
.dc-sha { margin-top: 6px; font-size: .74rem; color: var(--text-muted); display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.dc-sha code { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: .72rem; color: var(--text-secondary); word-break: break-all; }
.dc-copy { background: none; border: 1px solid var(--border); border-radius: 5px; color: var(--text-secondary); padding: 2px 6px; cursor: pointer; font-size: .7rem; }
.dc-copy:hover { color: var(--accent); border-color: var(--accent); }

.dc-empty { padding: 40px 0; text-align: center; color: var(--text-muted); }

/* small screens: each row becomes a block, labels from data-label */
@media (max-width: 760px) {
  .dc-bar select { flex: 1 1 45%; }
  .dc-table thead { display: none; }
  .dc-table, .dc-table tbody, .dc-table tr, .dc-table td { display: block; width: 100%; }
  .dc-row { padding: 12px 0; border-bottom: 1px solid var(--border); }
  .dc-row td { border: 0; padding: 3px 0; }
  .dc-row .dc-type, .dc-row .dc-ver { display: inline-block; width: auto; margin-right: 14px; font-size: .78rem; color: var(--text-muted); }
  .dc-row .dc-ver:has(.dc-dash) { display: none; }
  .dc-row .dc-ver .dc-muted { display: inline; margin-left: 6px; }
  .dc-row .dc-files { margin-top: 6px; }
  .dc-detail td { padding: 0 10px 12px; }
  .dc-rel-head .dc-file { margin-left: 0; }
}
