* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: 'SF Mono', 'Fira Code', 'JetBrains Mono', 'Courier New', monospace; background: linear-gradient(160deg, #020617 0%, #0f172a 50%, #0c1220 100%); color: #e2e8f0; min-height: 100vh; }
.container { max-width: 820px; margin: 0 auto; padding: 28px 20px; }
.sub { font-size: 8px; letter-spacing: 0.25em; color: #334155; text-transform: uppercase; margin-bottom: 8px; }
h1 { font-size: 22px; font-weight: 700; color: #f1f5f9; letter-spacing: -0.03em; margin: 0; }
.header-row { display: flex; justify-content: space-between; align-items: flex-start; flex-wrap: wrap; gap: 12px; }
.btn-group { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.btn { border-radius: 4px; font-size: 10px; font-weight: 600; padding: 6px 14px; cursor: pointer; font-family: inherit; transition: all 0.15s; }
.btn-export { background: linear-gradient(135deg, rgba(34,197,94,0.15), rgba(16,185,129,0.1)); border: 1px solid rgba(34,197,94,0.3); color: #4ade80; }
.btn-search { background: linear-gradient(135deg, rgba(99,102,241,0.2), rgba(139,92,246,0.15)); border: 1px solid rgba(99,102,241,0.25); color: #a5b4fc; }
.btn-search:disabled { background: rgba(50,50,70,0.3); color: #475569; cursor: wait; }
.btn:hover { filter: brightness(1.2); }
.summary { display: flex; gap: 10px; margin-bottom: 20px; flex-wrap: wrap; }
.summary-box { flex: 1 1 100px; background: rgba(15,23,42,0.5); border: 1px solid rgba(100,116,139,0.08); border-radius: 5px; padding: 10px 12px; }
.summary-label { font-size: 8px; color: #475569; letter-spacing: 0.1em; margin-bottom: 3px; }
.summary-val { font-size: 16px; font-weight: 700; }
.legend { background: rgba(15,23,42,0.35); border: 1px solid rgba(100,116,139,0.06); border-radius: 5px; padding: 10px 14px; margin-bottom: 8px; display: flex; gap: 16px; flex-wrap: wrap; align-items: center; }
.legend:last-of-type { margin-bottom: 24px; }
.legend-title { font-size: 9px; color: #334155; font-weight: 700; letter-spacing: 0.1em; }
.legend-item { display: flex; align-items: center; gap: 4px; font-size: 9px; color: #475569; }
.cat-title { font-size: 9px; font-weight: 700; letter-spacing: 0.15em; text-transform: uppercase; color: #475569; margin-bottom: 8px; padding-bottom: 6px; border-bottom: 1px solid rgba(100,116,139,0.08); }
.cat-group { margin-bottom: 22px; }
.card { background: rgba(15,23,42,0.55); border: 1px solid rgba(100,116,139,0.1); border-radius: 6px; position: relative; transition: all 0.2s; margin-bottom: 6px; }
.card-sev { height: 2px; border-radius: 6px 6px 0 0; opacity: 0.7; }
.card-body { padding: 12px 16px; cursor: pointer; }
.card-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; gap: 8px; }
.card-name-row { display: flex; align-items: center; gap: 7px; flex: 1; }
.card-name { font-size: 12px; font-weight: 600; color: #e2e8f0; }
.dir-badge { display: flex; align-items: center; gap: 5px; padding: 3px 10px; border-radius: 3px; }
.dir-symbol { font-size: 10px; font-weight: 800; }
.dir-label { font-size: 9px; font-weight: 700; letter-spacing: 0.08em; }
.card-content { display: flex; justify-content: space-between; align-items: flex-end; }
.card-note { font-size: 11px; color: #94a3b8; line-height: 1.5; max-width: 420px; }
.btn-sm { background: rgba(99,102,241,0.1); border: 1px solid rgba(99,102,241,0.2); border-radius: 3px; color: #818cf8; font-size: 9px; font-family: inherit; padding: 3px 8px; cursor: pointer; margin-left: 12px; white-space: nowrap; }
.btn-sm:disabled { color: #334155; cursor: wait; }
.expand-hint { font-size: 9px; color: #334155; margin-top: 6px; text-align: right; }
.detail { padding: 0 16px 14px; border-top: 1px solid rgba(100,116,139,0.08); padding-top: 12px; }
.trend-row { display: flex; gap: 0; margin-bottom: 10px; overflow-x: auto; }
.trend-cell { padding: 5px 10px; background: rgba(30,41,59,0.5); border-right: 1px solid rgba(100,116,139,0.08); min-width: 75px; }
.trend-period { font-size: 8px; color: #475569; margin-bottom: 2px; }
.trend-val { font-size: 13px; font-weight: 700; color: #e2e8f0; }
.trend-delta { font-size: 9px; font-weight: 600; }
.delta-up { color: #ef4444; }
.delta-down { color: #22c55e; }
.delta-flat { color: #64748b; }
.detail-note { font-size: 10px; color: #64748b; line-height: 1.6; margin-bottom: 10px; }
.source-row { background: rgba(30,41,59,0.4); border-radius: 4px; padding: 8px 10px; display: flex; justify-content: space-between; align-items: flex-start; flex-wrap: wrap; gap: 10px; }
.source-label { font-size: 8px; color: #475569; letter-spacing: 0.1em; font-weight: 700; margin-bottom: 3px; }
.source-val { font-size: 10px; color: #94a3b8; }
.rel-dots { display: flex; gap: 2px; }
.rel-dot { width: 5px; height: 5px; border-radius: 50%; }
.rel-label { font-size: 8px; font-weight: 700; letter-spacing: 0.1em; }
.rel-note { font-size: 8px; color: #3b4252; margin-top: 2px; max-width: 200px; }
.search-result { margin-top: 8px; background: rgba(99,102,241,0.05); border: 1px solid rgba(99,102,241,0.1); border-radius: 4px; padding: 10px; }
.search-result-label { font-size: 8px; color: #818cf8; letter-spacing: 0.1em; font-weight: 700; margin-bottom: 4px; }
.search-result-text { font-size: 10px; color: #cbd5e1; line-height: 1.6; max-height: 180px; overflow-y: auto; }
.info-icon { display: inline-flex; align-items: center; justify-content: center; width: 16px; height: 16px; border-radius: 50%; background: rgba(99,102,241,0.12); border: 1px solid rgba(99,102,241,0.25); color: #818cf8; font-size: 10px; font-weight: 700; font-family: Georgia, serif; font-style: italic; cursor: help; line-height: 1; user-select: none; transition: all 0.15s; position: relative; }
.info-icon:hover { background: rgba(99,102,241,0.25); border-color: rgba(99,102,241,0.5); }
.tooltip { display: none; position: absolute; left: 24px; top: 50%; transform: translateY(-50%); z-index: 1000; width: 340px; max-width: 80vw; background: rgba(15,23,42,0.97); border: 1px solid rgba(99,102,241,0.2); border-radius: 6px; padding: 12px 14px; box-shadow: 0 8px 32px rgba(0,0,0,0.5); backdrop-filter: blur(12px); }
.info-icon:hover .tooltip { display: block; }
.tooltip-title { font-size: 8px; font-weight: 700; letter-spacing: 0.12em; color: #818cf8; margin-bottom: 6px; font-style: normal; }
.tooltip-body { font-size: 11px; color: #cbd5e1; line-height: 1.65; font-style: normal; }
.footer { margin-top: 28px; padding-top: 14px; border-top: 1px solid rgba(100,116,139,0.08); font-size: 9px; color: #1e293b; line-height: 1.7; }
.footer strong { color: #334155; }
.chart-svg { display: block; }
.print-explanation { display: none; background: #f0f0ff; border-radius: 4px; padding: 8px 10px; margin-bottom: 10px; border: 1px solid #e0e0f0; }
.print-explanation-title { font-size: 8px; color: #44c; margin-bottom: 3px; letter-spacing: 0.1em; font-weight: 700; }
.print-explanation-body { font-size: 9px; color: #333; line-height: 1.6; }

@media print {
  body { background: #fff !important; color: #111 !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .container { padding: 12px; }
  .no-print { display: none !important; }
  .card { background: #fff !important; border-color: #ddd !important; break-inside: avoid; page-break-inside: avoid; }
  .card-name { color: #111 !important; }
  .card-note { color: #555 !important; }
  .detail { display: block !important; }
  .trend-cell { background: #f8f8f8 !important; }
  .trend-val { color: #111 !important; }
  .source-row { background: #f5f5f5 !important; }
  .source-val { color: #555 !important; }
  .tooltip { display: none !important; }
  .print-explanation { display: block !important; }
  h1 { color: #111 !important; }
  .cat-title { color: #666 !important; }
  .summary-box { background: #f8f8f8 !important; border-color: #ddd !important; }
  .legend { background: #f8f8f8 !important; border-color: #ddd !important; }
  .footer { color: #888 !important; border-color: #ddd !important; }
}
