/* Henaifuos components in plain CSS: Button, TerminalLabel, Pill, Panel, StatCounter, Marquee, TimelineItem. */

/* Button */
.hf-btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  min-height: 48px;
  padding: 0 var(--space-6);
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 600;
  line-height: 1;
  text-decoration: none;
  cursor: pointer;
  transition: transform var(--dur-fast) var(--ease-out), box-shadow var(--dur-fast) var(--ease-out), border-color var(--dur-fast), color var(--dur-fast);
}
.hf-btn--primary { background: var(--accent); color: var(--on-accent); }
.hf-btn--primary:hover { transform: translateY(-2px); box-shadow: var(--shadow-glow); }
.hf-btn--ghost { background: transparent; color: var(--ink); border-color: var(--line-strong); }
.hf-btn--ghost:hover { border-color: var(--accent-text); color: var(--accent-text); transform: translateY(-2px); }
.hf-btn:active { transform: scale(0.98); }
.hf-btn:focus-visible { outline: 2px solid var(--accent-text); outline-offset: 3px; }
.hf-btn--sm { min-height: 44px; padding: 0 var(--space-4); font-size: 13px; }
.hf-btn__prompt { opacity: 0.6; }

/* TerminalLabel */
.hf-label { margin: 0; color: var(--accent-text); }
.hf-label__prompt { opacity: 0.7; }
.hf-caret {
  display: inline-block;
  width: 0.55em;
  height: 1.1em;
  margin-left: var(--space-1);
  vertical-align: -0.2em;
  background: currentColor;
  animation: hf-blink 1.06s steps(1) infinite;
}
@keyframes hf-blink { 50% { opacity: 0; } }

/* Pill */
.hf-pill {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: 6px var(--space-3);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-pill);
  background: transparent;
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  line-height: 1;
  white-space: nowrap;
}
.hf-pill--accent { background: var(--accent-soft); border-color: var(--accent-text); color: var(--accent-text); }

/* Panel */
.hf-panel {
  padding: var(--space-8);
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background: var(--surface);
  box-shadow: var(--shadow-panel);
}
.hf-panel__head { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--space-4); margin-bottom: var(--space-6); }
.hf-panel__title { margin: 0; color: var(--ink); }
.hf-panel__subtitle { margin: var(--space-2) 0 0; color: var(--ink-muted); }

/* StatCounter */
.hf-stat { display: grid; gap: var(--space-1); margin: 0; }
.hf-stat__row { display: inline-flex; align-items: baseline; gap: var(--space-2); }
.hf-stat__num { color: var(--ink); font-variant-numeric: tabular-nums; }
.hf-stat__unit { color: var(--ink-muted); }
.hf-stat__label { color: var(--ink-muted); }

/* Marquee */
.hf-marquee {
  overflow: hidden;
  border-block: 1px solid var(--line);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.hf-marquee__track { display: flex; width: max-content; animation: hf-marquee var(--hf-speed, 40s) linear infinite; }
.hf-marquee:hover .hf-marquee__track, .hf-marquee:focus-within .hf-marquee__track { animation-play-state: paused; }
.hf-marquee__list {
  display: flex;
  flex-shrink: 0;
  gap: var(--space-8);
  margin: 0;
  padding: var(--space-4) var(--space-8) var(--space-4) 0;
  list-style: none;
}
.hf-marquee__list li { color: var(--ink-muted); font-family: var(--font-mono); font-size: 14px; white-space: nowrap; }
.hf-marquee__list li::after { content: "/"; margin-left: var(--space-8); color: var(--accent-text); }
@keyframes hf-marquee { to { transform: translateX(-50%); } }

/* TimelineItem */
.hf-timeline {
  display: grid;
  grid-template-columns: 148px 24px 1fr;
  gap: var(--space-4);
  padding-bottom: var(--space-8);
}
.hf-timeline__period { margin: 0; padding-top: var(--space-1); color: var(--ink-muted); }
.hf-timeline__rail { position: relative; display: flex; justify-content: center; }
.hf-timeline__rail::before { content: ""; position: absolute; top: 12px; bottom: calc(-1 * var(--space-8)); width: 1px; background: var(--line-strong); }
.hf-timeline__dot { position: relative; z-index: 1; width: 12px; height: 12px; margin-top: 6px; border: 2px solid var(--line-strong); border-radius: 50%; background: var(--bg); }
.hf-timeline--current .hf-timeline__dot { border-color: var(--accent); background: var(--accent); box-shadow: var(--shadow-glow); }
.hf-timeline__org { margin: 0; color: var(--ink); }
.hf-timeline__role { margin: var(--space-1) 0 0; color: var(--accent-text); }
.hf-timeline__text { margin: var(--space-3) 0 0; max-width: 58ch; color: var(--ink-muted); }

@media (max-width: 719px) {
  .hf-panel { padding: var(--space-6); }
  .hf-timeline { grid-template-columns: 24px 1fr; gap: var(--space-2) var(--space-4); }
  .hf-timeline__period { grid-column: 2; grid-row: 1; }
  .hf-timeline__rail { grid-column: 1; grid-row: 1 / span 2; }
  .hf-timeline__body { grid-column: 2; grid-row: 2; }
}

@media (prefers-reduced-motion: reduce) {
  .hf-caret { animation: none; }
  .hf-marquee__track { animation: none; flex-wrap: wrap; width: auto; }
  .hf-btn { transition-duration: 1ms; }
}
