/* Global styles for speed demo and activity chart */

/* Speed demo */
#speedBarImg{cursor: pointer; display:block; border-radius:6px;}
.speed-labels td{vertical-align: top; padding-top:0;}
.speed-label-row{display:flex; justify-content:space-between; width:255px; line-height:1; margin-top:0;}
.speed-label-row span{display:inline-block;}
.speed-bar-wrap{position:relative; width:255px; height:25px; border-radius:6px; overflow:hidden;}
.speed-marker{position:absolute; top:0; bottom:0; width:0; border-left:2px solid #333; pointer-events:none;}
.speed-story-box{width:25ch; border:1px solid #ccc; padding:8px; white-space:normal; overflow-wrap:break-word; word-wrap:break-word; overflow:visible; font-family:monospace; font-size:150%; background: yellow; border-radius:6px;}
.colorbox{display:inline-block; width:15px; height:15px; margin-right:8px; vertical-align:middle; border-radius:3px;}

/* Activity chart */
.activity-compare{background:transparent; border-radius:0; padding:0; display:block; margin:12px 0; vertical-align:top;}
.activity-compare table{border-collapse:collapse;}
.activity-compare th,.activity-compare td{padding:4px 8px; font-size:12px;}
.activity-compare .col-activity{white-space:nowrap;}
.activity-compare .bar-wrap{width:220px; height:14px; background:#eee; border-radius:8px; overflow:hidden;}
.activity-compare .bar{height:14px; border-radius:8px; display:block;}
.activity-compare .before{background:#cc0033;}
.activity-compare .after{background:#00a651;}
.activity-compare .legend-box{display:inline-block; width:18px; height:12px; border-radius:6px; vertical-align:middle; margin:0 4px;}
.activity-compare .legend-box.before{background:#cc0033;}
.activity-compare .legend-box.after{background:#00a651;}
.activity-compare .note{font-size:12px; color:#555; margin-top:6px;}
.sticky-shadow{ box-shadow: 0 2px 6px rgba(0,0,0,0.06); }
#sticky-header{ position: sticky; top: 0; z-index: 1000; background: #fff; }
/* Dark variant button (used for theme toggle) */
.rr-btn-dark { color:#334155; border-color:#334155; background:transparent }
.rr-btn-dark:hover { background:#eef2ff; color:#1f2937; border-color:#1f2937 }
/* RocketReader buttons (shared across header + pages) */
a.rr-btn, button.rr-btn, input.rr-btn[type=submit], input.rr-btn[type=button] {
  display:inline-block;
  padding:8px 14px;
  border-radius:4px;
  font-family:tahoma,Arial,Helvetica,sans-serif;
  font-size:13px;
  line-height:1.2;
  text-decoration:none;
  border:1px solid transparent;
  cursor:pointer;
  transition:background-color .18s ease, color .18s ease, box-shadow .18s ease, transform .06s ease;
}
/* Ensure link states don't override button colors */
a.rr-btn:link, a.rr-btn:visited { color: inherit; }
button.rr-btn:hover, a.rr-btn:hover, input.rr-btn[type=submit]:hover, input.rr-btn[type=button]:hover {
  box-shadow:0 2px 6px rgba(0,0,0,.12);
  transform:translateY(-1px)
}
button.rr-btn:active, a.rr-btn:active, input.rr-btn[type=submit]:active, input.rr-btn[type=button]:active {
  transform:translateY(0)
}
/* Outline (Login) */
.rr-btn-login { color:#00659F; border-color:#00659F; background:transparent }
.rr-btn-login:hover { background:#e8f4fa; color:#004d78; border-color:#004d78 }
/* Solid (Subscribe/Primary) */
.rr-btn-subscribe { color:#fff; background:#0198DA; border-color:#0198DA }
.rr-btn-subscribe:hover { background:#0287C2; border-color:#0287C2 }
/* Solid (Start Free Trial) — initially same as Subscribe */
.rr-btn-free-trial { color:#fff; background:#0198DA; border-color:#0198DA }
.rr-btn-free-trial:hover { background:#0287C2; border-color:#0287C2 }
/* Increase specificity for nav context so link colors don't win */
#leftnav a.rr-btn-subscribe, #leftnav a.rr-btn-subscribe:link, #leftnav a.rr-btn-subscribe:visited { color:#fff !important; }
#leftnav a.rr-btn-free-trial, #leftnav a.rr-btn-free-trial:link, #leftnav a.rr-btn-free-trial:visited { color:#fff !important; }
#leftnav a.rr-btn-login, #leftnav a.rr-btn-login:link, #leftnav a.rr-btn-login:visited { color:#00659F !important; }
/* Size variant for nav/sidebars */
.rr-btn--small { padding:6px 12px; font-size:12px; font-weight:600 }
/* Start Free Trial standout link (non-button) */

/* Expand/collapse: triangle glyphs instead of images */
a[onclick*="vanishShow"] {
  position: relative;
  padding-left: 24px; /* space for mid-size glyph */
}
a[onclick*="vanishShow"]::before {
  content: '▸';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  color: #00659F; /* brand blue */
  font-size: 21px; /* balanced size */
  line-height: 1;
}
a[onclick*="vanishShow"][aria-expanded="true"]::before { content: '▾'; }
/* Hide legacy folder icons when present */
a[onclick*="vanishShow"] > img[src$="open_folder.gif"],
a[onclick*="vanishShow"] > img[src$="close_folder.gif"] { display: none !important; }

/* Dark mode: improve readability for speed notes */
.dark-mode #speed-slow,
.dark-mode #speed-good,
.dark-mode #speed-excellent,
.dark-mode #speed-skim {
  color: #e5e7eb;
  background: #202123;
  border-left: 3px solid #6b7280; /* slate accent */
  padding: 6px 8px;
  border-radius: 6px;
}
