/* Three Times Reader Hub. Only article reading pages are enqueued. */
body.single-post button.ctt-back-to-top.ttrh-toggle,
body.ctt-category-reader button.ctt-back-to-top.ttrh-toggle {
  width:48px!important;
  height:48px!important;
  min-width:48px!important;
  min-height:48px!important;
  padding:0!important;
  display:flex!important;
  justify-content:center!important;
  align-items:center!important;
  background:#fff!important;
  border:1px solid var(--ctt-rule,rgba(17,17,17,.11))!important;
  border-radius:50%!important;
  color:#111!important;
  box-shadow:0 1px 7px rgba(0,0,0,.035)!important;
  -webkit-tap-highlight-color:transparent;
  touch-action:manipulation;
}
body.single-post button.ctt-back-to-top.ttrh-toggle .ctt-back-to-top-glyph,
body.ctt-category-reader button.ctt-back-to-top.ttrh-toggle .ctt-back-to-top-glyph {
  display:none!important;
}
.ctt-back-to-top.ttrh-toggle .ttrh-ring {
  width:46px;
  height:46px;
  display:block;
  pointer-events:none;
}
.ttrh-ring-track,.ttrh-ring-fill {
  fill:none;
  stroke-width:2.5;
  transition:opacity .2s ease;
}
.ttrh-ring-track {stroke:#e7e7e7;}
.ttrh-ring-fill {
  stroke:#228b22;
  stroke-linecap:round;
  transform:rotate(-90deg);
  transform-origin:26px 26px;
  transition:stroke-dashoffset 135ms linear,opacity .2s ease;
}
/* Original, transparently cropped Three Times artwork; the logo stays visible
   while the menu is open. The outer button's size and position do not change. */
.ctt-back-to-top.ttrh-toggle .ttrh-logo {
  position:absolute;
  top:50%;left:50%;
  transform:translate(-50%,-50%);
  width:20px;height:20px;
  display:block;
  background:url('assets/3x-reader-logo.png') center / contain no-repeat;
  pointer-events:none;
}
/* A small non-interactive discovery label, positioned from the actual button. */
.ttrh-hint[hidden] {display:none!important;}
.ttrh-hint {
  position:fixed;
  z-index:10009;
  box-sizing:border-box;
  pointer-events:none;
  white-space:nowrap;
  padding:8px 11px;
  color:#111;
  background:#fff;
  border:1px solid var(--ctt-rule,rgba(17,17,17,.11));
  border-radius:9px;
  box-shadow:0 2px 11px rgba(0,0,0,.045);
  font:400 10px/1.4 "CTT River Mono",monospace;
  letter-spacing:.055em;
  opacity:0;
  transform:translateY(5px);
  transition:opacity .22s ease,transform .22s ease;
}
.ttrh-hint.ttrh-hint-visible {opacity:1;transform:translateY(0);}
.ttrh-toggle.ttrh-inactive .ttrh-ring-track,
.ttrh-toggle.ttrh-inactive .ttrh-ring-fill {opacity:0;}
.ttrh-toggle:focus-visible,
.ttrh-panel button:focus-visible {
  outline:2px solid #228b22!important;
  outline-offset:3px!important;
}
/* Floating panel follows the theme's JS-positioned button, including Safari. */
.ttrh-panel[hidden] {display:none!important;}
.ttrh-panel {
  position:fixed;
  z-index:10011;
  box-sizing:border-box;
  width:min(258px, calc(100vw - 24px));
  max-height:min(410px, calc(100dvh - 110px));
  overflow:auto;
  overscroll-behavior:contain;
  background:#fff;
  color:#111;
  border:1px solid var(--ctt-rule,rgba(17,17,17,.11));
  border-radius:16px;
  padding:17px 15px 11px;
  box-shadow:0 12px 32px rgba(0,0,0,.10);
  font-family:"CTT River Mono",monospace;
  animation:ttrh-arrive 220ms cubic-bezier(.2,.75,.3,1) both;
}
.ttrh-panel * {box-sizing:border-box;}
.ttrh-panel-top {
  display:flex;
  justify-content:space-between;
  gap:7px;
  align-items:center;
  color:#111;
  font-size:11px;
  font-weight:500;
  line-height:1.5;
  letter-spacing:.055em;
}
.ttrh-percent {font-size:10px;color:#228b22;white-space:nowrap;}
.ttrh-story-title {
  color:#858585;
  font-size:11px;
  line-height:1.5;
  margin:7px 0 12px;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.ttrh-panel-rule {height:1px;background:var(--ctt-rule,rgba(17,17,17,.11));margin-bottom:5px;}
.ttrh-panel .ttrh-tool {
  all:unset;
  appearance:none;
  -webkit-appearance:none;
  box-sizing:border-box;
  width:100%;
  min-height:42px;
  padding:8px 6px;
  display:flex;
  align-items:center;
  gap:13px;
  color:#111;
  border-radius:7px;
  cursor:pointer;
  text-align:left;
  font:400 12px/1.45 "CTT River Mono",monospace;
  -webkit-tap-highlight-color:transparent;
  transition:background .16s ease;
}
.ttrh-panel .ttrh-tool:active {background:#f6f6f6;}
.ttrh-panel a.ttrh-tool, .ttrh-panel a.ttrh-tool:hover, .ttrh-panel a.ttrh-tool:focus {
  color:#111!important;
  text-decoration:none!important;
}
.ttrh-panel-nav-rule {
  height:1px;
  background:var(--ctt-rule,rgba(17,17,17,.11));
  margin:7px 4px 5px;
}
@media(hover:hover){.ttrh-panel .ttrh-tool:hover {background:#f8f8f8;}}
.ttrh-tool .ttrh-item-icon {
  display:block;
  width:18px;
  height:18px;
  flex:none;
  fill:none;
  stroke:currentColor;
  stroke-width:1.7;
  stroke-linecap:round;
  stroke-linejoin:round;
}
.ttrh-tool.ttrh-saved .ttrh-item-icon {fill:#228b22;stroke:#228b22;}
.ttrh-toast {
  color:#228b22;
  font:400 10px/1.5 "CTT River Mono",monospace;
  letter-spacing:.02em;
  margin:3px 4px 0;
  min-height:0;
}
.ttrh-toast:empty {display:none;}
@keyframes ttrh-arrive {
  from {opacity:0;transform:translateY(7px) scale(.975);}
  to {opacity:1;transform:translateY(0) scale(1);}
}
@media(max-width:680px){
  body.single-post button.ctt-back-to-top.ttrh-toggle,
  body.ctt-category-reader button.ctt-back-to-top.ttrh-toggle {
    width:48px!important;height:48px!important;
  }
  /* Only single posts are positioned with JS by Henrik. Category reader
     controls must retain the theme's original right-edge positioning. */
  body.single-post button.ctt-back-to-top.ttrh-toggle {right:auto!important;}
  body.ctt-category-reader button.ctt-back-to-top.ttrh-toggle {right:14px!important;left:auto!important;}
  .ttrh-panel {width:min(245px,calc(100vw - 24px));}
}
@media(prefers-reduced-motion:reduce){
  .ttrh-panel,.ttrh-ring-fill,.ttrh-ring-track,.ttrh-hint,.ttrh-tool {animation:none!important;transition:none!important;}
}
