/* =========================================================
   DICKSON RECORDS — PUBLIC ARCHIVE SYSTEM LAYER / V1
   Micro declassification loader + live access trace.
   ========================================================= */

:root{
  --dck-system-yellow:#e2c134;
  --dck-system-black:#000;
  --dck-system-line:#292925;
  --dck-system-dim:#777770;
}

/* ---------- MICRO LOADER ---------- */
.dck-system-loader{
  position:fixed;
  inset:0;
  z-index:2147483000;
  display:grid;
  place-items:center;
  background:#000;
  color:#efeee8;
  opacity:1;
  visibility:visible;
  transition:opacity .28s ease, visibility .28s ease;
  overflow:hidden;
}
.dck-system-loader.is-cleared{
  opacity:0;
  visibility:hidden;
  pointer-events:none;
}
.dck-loader-grid{
  position:absolute;
  inset:-1px;
  opacity:.18;
  background-image:
    linear-gradient(rgba(226,193,52,.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(226,193,52,.04) 1px, transparent 1px);
  background-size:42px 42px;
  mask-image:linear-gradient(to bottom,transparent 0,#000 18%,#000 82%,transparent 100%);
}
.dck-loader-grid::after{
  content:"";
  position:absolute;
  inset:-30% 0 auto;
  height:28%;
  background:linear-gradient(to bottom,transparent,rgba(226,193,52,.07),transparent);
  animation:dck-system-scan 1.15s linear infinite;
}
@keyframes dck-system-scan{to{transform:translateY(470%)}}

.dck-loader-shell{
  position:relative;
  width:min(520px,calc(100vw - 40px));
  border:1px solid #2b2b27;
  background:rgba(0,0,0,.88);
  box-shadow:0 0 0 1px rgba(226,193,52,.03) inset;
}
.dck-loader-top{
  min-height:34px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:18px;
  padding:0 12px;
  border-bottom:1px solid #242420;
  color:#6e6e68;
  font:8px/1.2 "IBM Plex Mono",monospace;
  letter-spacing:.08em;
}
.dck-loader-top span:first-child{color:#aaa99f}
.dck-loader-main{padding:24px 20px 18px}
.dck-loader-state{
  display:block;
  color:var(--dck-system-yellow);
  font:700 12px/1.2 "IBM Plex Mono",monospace;
  letter-spacing:.14em;
  text-transform:uppercase;
}
.dck-loader-state::after{
  content:"";
  animation:dck-system-dots .72s steps(4,end) infinite;
}
@keyframes dck-system-dots{
  0%{content:""}25%{content:"."}50%{content:".."}75%,100%{content:"..."}
}
.dck-loader-record{
  margin:11px 0 18px;
  font:clamp(18px,4vw,30px)/1 "Archivo Narrow",sans-serif;
  letter-spacing:.02em;
  color:#efeee8;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
.dck-loader-terminal{
  min-height:62px;
  display:grid;
  align-content:end;
  gap:5px;
  padding:10px 0;
  border-top:1px solid #1d1d1a;
  color:#777770;
  font:9px/1.35 "IBM Plex Mono",monospace;
  letter-spacing:.045em;
}
.dck-loader-terminal span{display:block}
.dck-loader-terminal .is-live{color:#b9b8b0}
.dck-loader-terminal .is-granted{color:var(--dck-system-yellow)}
.dck-loader-progress{
  height:2px;
  margin-top:10px;
  background:#1d1d1a;
  overflow:hidden;
}
.dck-loader-progress > span{
  display:block;
  width:0;
  height:100%;
  background:var(--dck-system-yellow);
  animation:dck-system-progress 1.28s cubic-bezier(.72,0,.19,1) forwards;
}
@keyframes dck-system-progress{
  0%{width:0}25%{width:18%}52%{width:49%}78%{width:82%}100%{width:100%}
}
.dck-loader-foot{
  display:flex;
  justify-content:space-between;
  gap:12px;
  margin-top:10px;
  color:#494944;
  font:7px/1.2 "IBM Plex Mono",monospace;
  letter-spacing:.08em;
}

/* ---------- ACCESS TRACE ---------- */
.dck-access-trace{
  position:fixed;
  z-index:9990;
  right:16px;
  bottom:16px;
  width:292px;
  background:rgba(2,2,2,.92);
  border:1px solid #2b2b27;
  border-top:2px solid var(--dck-system-yellow);
  color:#b9b8b0;
  box-shadow:0 12px 42px rgba(0,0,0,.32);
  backdrop-filter:blur(7px);
  -webkit-backdrop-filter:blur(7px);
  font-family:"IBM Plex Mono",monospace;
  transition:width .2s ease, opacity .2s ease, transform .2s ease;
}
.dck-access-trace.is-collapsed{width:196px}
.dck-access-trace.is-collapsed .dck-trace-body{display:none}
.dck-trace-head{
  min-height:31px;
  display:grid;
  grid-template-columns:auto 1fr auto;
  align-items:center;
  gap:7px;
  padding:0 9px;
  border-bottom:1px solid #242420;
  font-size:7px;
  letter-spacing:.08em;
}
.dck-trace-dot{
  width:5px;height:5px;border-radius:50%;background:var(--dck-system-yellow);
  box-shadow:0 0 8px rgba(226,193,52,.45);
  animation:dck-trace-pulse 1.5s ease-in-out infinite;
}
@keyframes dck-trace-pulse{50%{opacity:.3}}
.dck-trace-head strong{color:#aaa99f;font-weight:500}
.dck-trace-toggle{
  appearance:none;
  border:0;
  background:transparent;
  color:#5f5f59;
  padding:6px;
  cursor:pointer;
  font:8px "IBM Plex Mono",monospace;
}
.dck-trace-body{padding:10px 10px 9px}
.dck-trace-path{
  color:#595953;
  font-size:7px;
  letter-spacing:.04em;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
  margin-bottom:9px;
}
.dck-trace-grid{display:grid;grid-template-columns:77px 1fr;gap:5px 8px;font-size:8px;line-height:1.25}
.dck-trace-grid span:nth-child(odd){color:#585852}
.dck-trace-grid span:nth-child(even){color:#b4b3aa;text-align:right;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.dck-trace-grid .dck-trace-reading{color:var(--dck-system-yellow)}
.dck-trace-progress-wrap{margin-top:10px;border-top:1px solid #1d1d1a;padding-top:7px}
.dck-trace-progress-meta{display:flex;justify-content:space-between;color:#51514c;font-size:7px;margin-bottom:5px}
.dck-trace-progress{height:1px;background:#242420;overflow:hidden}
.dck-trace-progress > span{display:block;width:0;height:100%;background:var(--dck-system-yellow);transition:width .12s linear}

/* ---------- SYSTEM TOAST / DENIED LAYER ---------- */
.dck-system-toast{
  position:fixed;
  z-index:10020;
  top:84px;
  right:16px;
  max-width:330px;
  padding:10px 12px;
  border:1px solid #3a3416;
  background:#050505;
  color:var(--dck-system-yellow);
  font:8px/1.45 "IBM Plex Mono",monospace;
  letter-spacing:.06em;
  opacity:0;
  transform:translateY(-7px);
  pointer-events:none;
  transition:.2s ease;
}
.dck-system-toast.is-visible{opacity:1;transform:none}

/* ---------- MOBILE ---------- */
@media(max-width:720px){
  .dck-loader-shell{width:calc(100vw - 28px)}
  .dck-loader-main{padding:20px 14px 15px}
  .dck-loader-record{font-size:22px}
  .dck-access-trace{
    right:10px;
    bottom:10px;
    width:min(292px,calc(100vw - 20px));
  }
  .dck-access-trace.is-collapsed{width:176px}
}
@media(max-width:520px){
  .dck-access-trace:not(.is-expanded){width:176px}
  .dck-access-trace:not(.is-expanded) .dck-trace-body{display:none}
  .dck-trace-head{min-height:29px}
}

@media(prefers-reduced-motion:reduce){
  .dck-loader-grid::after,.dck-loader-state::after,.dck-trace-dot{animation:none}
  .dck-loader-progress > span{animation-duration:.25s}
  .dck-system-loader,.dck-access-trace{transition:none}
}
